Re: [MacRuby-devel] [MacRuby] #613: Dispatch classes should be wrapped in an Data struct to allow subclassing

2010-02-16 Thread MacRuby
#613: Dispatch classes should be wrapped in an Data struct to allow subclassing
+---
 Reporter:  ernest.prabha...@…  |   Owner:  lsansone...@…
 Type:  defect  |  Status:  new  
 Priority:  minor   |   Milestone:   
Component:  MacRuby |Keywords:   
+---

Comment(by pthom...@…):

 The attached diff covers all the needed changes. I'll commit it as soon as
 I can be sure that a crash I'm encountering in the RubySpecs is not due to
 this change.

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] [MacRuby] #613: Dispatch classes should be wrapped in an Data struct to allow subclassing

2010-02-16 Thread MacRuby
#613: Dispatch classes should be wrapped in an Data struct to allow subclassing
+---
 Reporter:  ernest.prabha...@…  |   Owner:  pthom...@…
 Type:  defect  |  Status:  new   
 Priority:  minor   |   Milestone:
Component:  MacRuby |Keywords:
+---
Changes (by pthom...@…):

  * owner:  lsansone...@… => pthom...@…


-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] [MacRuby] #613: Dispatch classes should be wrapped in an Data struct to allow subclassing

2010-02-16 Thread MacRuby
#613: Dispatch classes should be wrapped in an Data struct to allow subclassing
+---
 Reporter:  ernest.prabha...@…  |   Owner:  pthom...@…
 Type:  defect  |  Status:  new   
 Priority:  minor   |   Milestone:
Component:  MacRuby |Keywords:
+---

Comment(by ernest.prabha...@…):

 Wow, very cool.

 One question: as long as we're making this change, should we also create a
 Dispatch::Base object containing the common functionality, which all the
 other objects (well, at least Queue and Source) could inherit from?

 Oh, and one more: was I correct that this is what prevented me from
 subclassing Dispatch::Group?

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] [MacRuby] #615: macruby segfaults when generating large random numbers

2010-02-16 Thread MacRuby
#615: macruby segfaults when generating large random numbers
---+
 Reporter:  ahob...@…  |   Owner:  lsansone...@…
 Type:  defect |  Status:  new  
 Priority:  major  |   Milestone:   
Component:  MacRuby|Keywords:  rand bignum  
---+

Comment(by ahob...@…):

 Replying to [comment:1 lsansone...@…]:
 > We changed random numbers very recently, when did you try this? I was
 not able to reproduce the crash with today's trunk.

 I originally tried it by rebuilding from source two days ago, but I pulled
 the latest from git and tried that.
 {{{
 % git show --quiet
 commit 87110990023d0693189661f8bd8fed3a3b650af2
 Author: [email protected]
 http://svn.macosforge.org/repository/ruby/MacRuby/tr...@3562 233
 }}}

 It crashes the same way.


 I also downloaded the nightly build from 2010-02-16 and I get the same
 error.  I removed /Library/Frameworks/MacRuby.framework before installing
 the nightly just to make sure my build wasn't messing things up somehow.

 Below is the Diagnostic log from when I run the command using the nightly
 build.  Is there any other info I can provide?

 Thanks again.

 {{{
 Process: macruby [53946]
 Path:
 /Library/Frameworks/MacRuby.framework/Versions/0.6/usr/bin/macruby
 Identifier:  macruby
 Version: ??? (???)
 Code Type:   X86-64 (Native)
 Parent Process:  zsh [1266]

 Date/Time:   2010-02-16 21:29:15.888 -0500
 OS Version:  Mac OS X 10.6.2 (10C540)
 Report Version:  6

 Exception Type:  EXC_BAD_ACCESS (SIGABRT)
 Exception Codes: KERN_INVALID_ADDRESS at 0xcea54ec3
 Crashed Thread:  0  Dispatch queue: com.apple.main-thread

 Application Specific Information:
 objc[53946]: garbage collection is ON
 abort() called
 Thread 0 Crashed:  Dispatch queue: com.apple.main-thread
 0   libSystem.B.dylib   0x7fff820f2fe6 __kill + 10
 1   libSystem.B.dylib   0x7fff82193e32 abort + 83
 2   libmacruby.dylib0x00010004429d rb_bug + 205
 3   libmacruby.dylib0x0001000eadf0 sigbus + 0
 4   libSystem.B.dylib   0x7fff82104eaa _sigtramp + 26
 5   ??? 0x7fff5fbfeb60 0 +
 140734799801184
 6   libauto.dylib   0x7fff82514488
 Auto::Zone::block_allocate(Auto::Thread&, unsigned long, unsigned int,
 bool, bool) + 1048
 7   libauto.dylib   0x7fff825041f3
 auto_realloc(_malloc_zone_t*, void*, unsigned long) + 851
 8   libSystem.B.dylib   0x7fff820acb3b
 malloc_zone_realloc + 92
 9   libmacruby.dylib0x0001000534da ruby_xrealloc +
 42
 10  libmacruby.dylib0x0001000271fc rb_big_realloc
 + 172
 11  libmacruby.dylib0x00010002aca1 bignorm + 369
 12  libmacruby.dylib0x0001000b1f38 rb_f_rand + 120
 13  libmacruby.dylib0x000100174852 rb_vm_dispatch
 + 6098
 14  ??? 0x00010104009e 0 + 4312006814
 15  libmacruby.dylib0x000100183f9f rb_vm_run + 351
 16  libmacruby.dylib0x0001000464d9 ruby_run_node +
 73
 17  macruby 0x00010d28 main + 152
 18  macruby 0x00010c88 start + 52
 }}}

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] [MacRuby] #615: macruby segfaults when generating large random numbers

2010-02-16 Thread MacRuby
#615: macruby segfaults when generating large random numbers
---+
 Reporter:  ahob...@…  |   Owner:  lsansone...@…
 Type:  defect |  Status:  new  
 Priority:  major  |   Milestone:   
Component:  MacRuby|Keywords:  rand bignum  
---+

Comment(by ahob...@…):

 I just noticed that assigning to a variable seems to affect the behavior
 if I generate a smaller number.
 {{{
 # notice no crash!
 % macruby -e 'x=rand(2**1024)'

 # but this does crash
 % macruby -e 'x=rand(2**1024);puts x'
 unknown: [BUG] Segmentation fault
 MacRuby version 0.6 (ruby 1.9.0) [universal-darwin10.0, x86_64]

 zsh: abort  macruby -e 'x=rand(2**1024);puts x'

 # maybe we just got lucky before?
 % macruby -e 'x=rand(2**1024)'
 % macruby -e 'x=rand(2**1024)'
 % macruby -e 'x=rand(2**1024)'

 # doesn't seem like it.  But generating a larger random number always
 seems to crash
 % macruby -e 'x=rand(2**2048)'
 unknown: [BUG] Segmentation fault
 MacRuby version 0.6 (ruby 1.9.0) [universal-darwin10.0, x86_64]

 zsh: abort  macruby -e 'x=rand(2**2048)'
 % macruby -e 'x=rand(2**2048)'
 unknown: [BUG] Segmentation fault
 MacRuby version 0.6 (ruby 1.9.0) [universal-darwin10.0, x86_64]

 zsh: abort  macruby -e 'x=rand(2**2048)'

 # hmm, where does the problem seem to occur between 1024 and 2048?
 # 2**1472 seems to be reliably ok
 % macruby -e 'x=rand(2**1472)'
 % macruby -e 'x=rand(2**1472)'
 % macruby -e 'x=rand(2**1472)'

 # but 2**1473 seems to reliably crash
 % macruby -e 'x=rand(2**1473)'
 unknown: [BUG] Segmentation fault
 MacRuby version 0.6 (ruby 1.9.0) [universal-darwin10.0, x86_64]

 zsh: abort  macruby -e 'x=rand(2**1473)'

 }}}

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


[MacRuby-devel] [MacRuby] #616: MacRuby does not return control to terminal

2010-02-16 Thread MacRuby
#616: MacRuby does not return control to terminal
-+--
 Reporter:  u...@…|   Owner:  lsansone...@…
 Type:  defect   |  Status:  new  
 Priority:  major|   Milestone:   
Component:  MacRuby  |Keywords:  hang, freeze 
-+--
 Executing this code

 {{{
 n = 500
 s = (0..n).to_a
 s[0] = s[1] = nil
 s.each do |p|
   next unless p
   break if p * p > n
   puts p
   (p*p).step(n, p) { |m| s[m] = nil }
 end
 s.compact
 }}}

 MacRuby 0.5 just hangs, uses up the CPU and does not return to the
 terminal.
 Further information here: http://pastie.org/private/y9yyfnqql3st7ankcrk48w

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] [MacRuby] #616: MacRuby does not return control to terminal

2010-02-16 Thread MacRuby
#616: MacRuby does not return control to terminal
-+--
 Reporter:  u...@…|Owner:  lsansone...@…
 Type:  defect   |   Status:  closed   
 Priority:  major|Milestone:  MacRuby 0.6  
Component:  MacRuby  |   Resolution:  fixed
 Keywords:  hang, freeze |  
-+--
Changes (by lsansone...@…):

  * status:  new => closed
  * resolution:  => fixed
  * milestone:  => MacRuby 0.6


Comment:

 Thanks for the report. After investigation Array#compact was the culprit.
 I improved the algorithm in r3570 and now the program returns quicker.
 It's even faster than the original 1.9 here.

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel