Issue #4651 has been updated by Levin Alexander.

File config.log added

I just ran into this on Snow Leopard after reinstalling rvm [1]. I am using Xcode 4.2 (4C104)

config.log is attached.


$ cat cc.rb 
require 'continuation'
x = callcc { |b| b }
x.call

$ which ruby
/Users/levin/.rvm/rubies/ruby-1.9.2-head/bin/ruby

$ ruby cc.rb 
cc.rb:2: [BUG] Bus Error
ruby 1.9.2p274 (2011-06-06 revision 31932) [x86_64-darwin10.7.0]

-- control frame ----------
c:0004 p:---- s:0010 b:0010 l:000009 d:000009 CFUNC  :callcc
c:0003 p:0021 s:0007 b:0007 l:0014e8 d:001720 EVAL   cc.rb:2
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:0014e8 d:0014e8 TOP   
---------------------------
-- Ruby level backtrace information ----------------------------------------
cc.rb:2:in `<main>'
cc.rb:2:in `callcc'

-- C level backtrace information -------------------------------------------
0   libruby.1.9.1.dylib                 0x00000001001404fe rb_vm_bugreport + 110
1   libruby.1.9.1.dylib                 0x0000000100034513 report_bug + 259
2   libruby.1.9.1.dylib                 0x0000000100034681 rb_bug + 161
3   libruby.1.9.1.dylib                 0x00000001000d6f72 sigbus + 18
4   libSystem.B.dylib                   0x00007fff80fa466a _sigtramp + 26
5   ???                                 0x000000010027c000 0x0 + 4297572352

[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

Abort trap



[1] rvm 1.6.20, installed after deleting ~/.rvm directory
----------------------------------------
Bug #4651: Bus Error using continuation on x86_64-darwin11.0.0 (Lion)
http://redmine.ruby-lang.org/issues/4651

Author: Erik Michaels-Ober
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 


=begin
The following code crashes with a Bus Error on Ruby 1.9.2-p136 and 1.9.2-p180 built for x86_64-darwin11.0.0 (Lion). The same code works on both of those versions of Ruby built for x86_64-darwin10.0.0 (Snow Leopard).

(({require 'continuation'}))

(({cc = callcc {|cc| cc }; cc.call if cc}))

This actual code appears in the yard gem on ((<line 38 of yard.rb|URL:https://github.com/lsegal/yard/blob/master/lib/yard.rb#L38>)).

I've attached the crash log. Please let me know if you need any other information from me to help debug this issue. Thank you very much. Ruby makes me happy.
=end


-- 
http://redmine.ruby-lang.org