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

MacRuby ruby-noreply at macosforge.org
Mon Aug 30 22:46:15 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:                       
----------------------------------+-----------------------------------------

Comment(by watson1978@…):

 I think that the reason for the order of declaring the member of
 rb_source_t is not corresponding to rb_dispatch_obj_t, rb_queue_t and
 rb_group_t.

 {{{
 #!diff
 diff --git a/gcd.c b/gcd.c
 index cacd6b5..42131d2 100644
 --- a/gcd.c
 +++ b/gcd.c
 @@ -77,8 +77,8 @@ typedef enum SOURCE_TYPE_ENUM
  typedef struct {
      struct RBasic basic;
      int suspension_count;
 -    source_enum_t source_enum;
      dispatch_source_t source;
 +    source_enum_t source_enum;
      rb_vm_block_t *event_handler;
      VALUE handle;
  } rb_source_t;
 @@ -87,6 +87,7 @@ typedef struct {

  typedef struct {
      struct RBasic basic;
 +    int reserved;
      dispatch_semaphore_t sem;
      long count;
  } rb_semaphore_t;
 }}}

 Result:
 {{{
 $ DYLD_LIBRARY_PATH=. arch -x86_64 ./macruby -v -I./lib t.rb
 MacRuby 0.7 (ruby 1.9.2) [universal-darwin10.0, x86_64]
 /Users/watson/src/MacRuby/lib/dispatch/enumerable.rb:34: warning: `&'
 interpreted as argument prefix
 /Users/watson/src/MacRuby/lib/dispatch/enumerable.rb:36: warning: `&'
 interpreted as argument prefix
 #<Dispatch::Source:0x2000d5c80>

 $ DYLD_LIBRARY_PATH=. arch -i386 ./macruby -v -I./lib t.rb
 MacRuby 0.7 (ruby 1.9.2) [universal-darwin10.0, i386]
 /Users/watson/src/MacRuby/lib/dispatch/enumerable.rb:34: warning: `&'
 interpreted as argument prefix
 /Users/watson/src/MacRuby/lib/dispatch/enumerable.rb:36: warning: `&'
 interpreted as argument prefix
 #<Dispatch::Source:0x2081c60>
 }}}

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



More information about the macruby-tickets mailing list