[MacRuby] #880: Bus error with Dispatch::Source, Using 32bit arch.

MacRuby ruby-noreply at macosforge.org
Sun Aug 29 18:07:05 PDT 2010


#880: Bus error with Dispatch::Source, Using 32bit arch.
----------------------------------+-----------------------------------------
 Reporter:  watson1978@…          |       Owner:  lsansonetti@…        
     Type:  defect                |      Status:  new                  
 Priority:  blocker               |   Milestone:                       
Component:  MacRuby               |    Keywords:                       
----------------------------------+-----------------------------------------
 Test Script:
 {{{
 #!ruby
 require "dispatch"

 @q = Dispatch::Queue.new('org.macruby.gcd_spec.sources')
 @sm = Dispatch::Semaphore.new(0)
 @type = Dispatch::Source::DATA_ADD

 src = Dispatch::Source.new(@type, 0, 0, @q) { }
 p src
 }}}

 Result of 64bit:
 {{{
 $ macruby -v t.rb
 MacRuby 0.7 (ruby 1.9.2) [universal-darwin10.0, x86_64]
 /Library/Frameworks/MacRuby.framework/Versions/0.7/usr/lib/ruby/1.9.2/dispatch/enumerable.rb:34:
 warning: `&' interpreted as argument prefix
 /Library/Frameworks/MacRuby.framework/Versions/0.7/usr/lib/ruby/1.9.2/dispatch/enumerable.rb:36:
 warning: `&' interpreted as argument prefix
 #<Dispatch::Source:0x2000ea220>
 }}}

 Result of 32bit:
 {{{
 $ DYLD_LIBRARY_PATH=. gdb --args ./macruby -v -I./lib t.rb
 GNU gdb 6.3.50-20050815 (Apple version gdb-1469) (Wed May  5 04:36:56 UTC
 2010)
 Copyright 2004 Free Software Foundation, Inc.
 GDB is free software, covered by the GNU General Public License, and you
 are
 welcome to change it and/or distribute copies of it under certain
 conditions.
 Type "show copying" to see the conditions.
 There is absolutely no warranty for GDB.  Type "show warranty" for
 details.
 This GDB was configured as "x86_64-apple-darwin"...Reading symbols for
 shared libraries ..... done

 (gdb) r
 Starting program: /Users/qoo/src/MacRuby/macruby -v -I./lib t.rb
 Reading symbols for shared libraries .++++........................ done
 Reading symbols for shared libraries . done
 MacRuby 0.7 (ruby 1.9.2) [universal-darwin10.0, i386]
 /Users/qoo/src/MacRuby/lib/dispatch/enumerable.rb:34: warning: `&'
 interpreted as argument prefix
 /Users/qoo/src/MacRuby/lib/dispatch/enumerable.rb:36: warning: `&'
 interpreted as argument prefix

 Program received signal EXC_BAD_ACCESS, Could not access memory.
 Reason: KERN_PROTECTION_FAILURE at address: 0x00000008
 0x98259b4b in dispatch_resume ()
 (gdb) bt
 #0  0x98259b4b in dispatch_resume ()
 #1  0x0010aa3f in rb_dispatch_resume [inlined] () at
 /Users/qoo/src/MacRuby/gcd.c:606
 #2  0x0010aa3f in rb_source_init (self=25746864, sel=0x96d9a538, type=1,
 handle=1, mask=1, queue=25678560) at gcd.c:839
 #3  0x00154283 in rb_vm_dispatch (_vm=0xe06530, cache=0xa0433e0, top=0,
 self=25746864, klass=0x187a360, sel=0x96d9a538, block=0x18841c0, opt=2
 '\002', argc=4, argv=0xbffff27c) at dispatcher.cpp:167
 #4  0x00075238 in rb_class_new_instance_imp (klass=25666400, sel=0xe53e70,
 argc=4, argv=0xbffff27c) at vm.h:594
 #5  0x00154130 in rb_vm_dispatch (_vm=0xe06530, cache=0xa050460,
 top=25287232, self=25666400, klass=0x187a3a0, sel=0xe53e70,
 block=0x18841c0, opt=0 '\0', argc=4, argv=0xbffff27c) at
 dispatcher.cpp:435
 #6  0x09e00b85 in ?? ()
 #7  0x09e00368 in ?? ()
 #8  0x0016134c in rb_vm_run (fname=0x18773a0 "t.rb", node=0x187f0c0,
 binding=0x0, inside_eval=false) at vm.cpp:3823
 #9  0x00043391 in ruby_run_node (n=0x187f0c0) at eval.c:211
 #10 0x00001c68 in main (argc=4, argv=0xe060b0, envp=0xbffff36c) at
 main.cpp:40
 (gdb)
 }}}

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/880>
MacRuby <http://macruby.org/>



More information about the macruby-tickets mailing list