[MacRuby] #321: macgem crashes with "unknown: [BUG] Segmentation fault".
#321: macgem crashes with "unknown: [BUG] Segmentation fault". ---------------------------+------------------------------------------------ Reporter: occam@… | Owner: lsansonetti@… Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: ---------------------------+------------------------------------------------ macgem crashes with "unknown: [BUG] Segmentation fault". I tracked it to rubygems/config_file.rb:118): operating_system_config = Marshal.load Marshal.dump(OPERATING_SYSTEM_DEFAULTS) which crashes in the Marshal.load. Assuming the Marshal.dump is working (I can't confirm), the crash leads to macruby/marshal.c:1037ff where "RSTRING_LEN(arg->src)" blows up in a conditional: if (RSTRING_LEN(arg->src) > arg->offset) { The RSTRING_LEN macro tracks to CFStringGetLength crashing on "ptr" at macruby/string.c:625ff: long rb_str_clen(VALUE ptr) { return CFStringGetLength((CFStringRef)ptr); } The "VALUE ptr" gets passed in from Marshal.load and blows up in CFStringGetLength. I'm not sure whether the parameter is broken (though it seems valid), or whether perhaps Snow Leopard changed CFStringRef so that MacRuby's "struct load_arg *" needs to be updated to maintain compatibility. With luck, this issue is not too hard for a more astute debugger (or somone with knowledge of SL's CFStringRef) to solve. It would be nice to have macgem working (not to mention Marshal'ing). -- Ticket URL: <http://www.macruby.org/trac/ticket/321> MacRuby <http://macruby.org/>
#321: macgem crashes with "unknown: [BUG] Segmentation fault". ---------------------------+------------------------------------------------ Reporter: occam@… | Owner: lsansonetti@… Type: defect | Status: new Priority: major | Milestone: Component: MacRuby | Keywords: ---------------------------+------------------------------------------------ Comment(by occam@…): A little extra info on the crash: unknown: [BUG] Segmentation fault MacRuby version 0.5 (ruby 1.9.0) [universal-darwin10.0, x86_64] -- Ticket URL: <http://www.macruby.org/trac/ticket/321#comment:2> MacRuby <http://macruby.org/>
#321: macgem crashes with "unknown: [BUG] Segmentation fault". ---------------------------+------------------------------------------------ Reporter: occam@… | Owner: lsansonetti@… Type: defect | Status: new Priority: major | Milestone: MacRuby 0.5 Component: MacRuby | Keywords: ---------------------------+------------------------------------------------ Changes (by lsansonetti@…): * milestone: => MacRuby 0.5 Comment: Shorter to reproduce: {{{ $ ./miniruby -e "p Marshal.dump({})" unknown: [BUG] Segmentation fault MacRuby version 0.5 (ruby 1.9.0) [universal-darwin10.0, x86_64] Abort trap }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/321#comment:3> MacRuby <http://macruby.org/>
#321: macgem crashes with "unknown: [BUG] Segmentation fault". ---------------------------+------------------------------------------------ Reporter: occam@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: major | Milestone: MacRuby 0.5 Component: MacRuby | Resolution: fixed Keywords: | ---------------------------+------------------------------------------------ Changes (by lsansonetti@…): * status: new => closed * resolution: => fixed Comment: Should be fixed in r2460. {{{ (gdb) r Starting program: /Users/lrz/src/macruby-trunk/macruby -I./lib bin/gem Reading symbols for shared libraries .++++......................... done Reading symbols for shared libraries . done Reading symbols for shared libraries . done RubyGems is a sophisticated package manager for Ruby. This is a basic help message containing pointers to more information. Usage: gem -h/--help gem -v/--version gem command [arguments...] [options...] Examples: gem install rake gem list --local gem build package.gemspec gem help install Further help: gem help commands list all 'gem' commands gem help examples show some examples of usage gem help platforms show information about platforms gem help <COMMAND> show help on COMMAND (e.g. 'gem help install') Further information: http://rubygems.rubyforge.org Program exited with code 01. }}} Note that macgem doesn't still work, but at least it starts. We will make it work at 100% for the release. -- Ticket URL: <http://www.macruby.org/trac/ticket/321#comment:4> MacRuby <http://macruby.org/>
#321: macgem crashes with "unknown: [BUG] Segmentation fault". ---------------------------+------------------------------------------------ Reporter: occam@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: major | Milestone: MacRuby 0.5 Component: MacRuby | Resolution: fixed Keywords: | ---------------------------+------------------------------------------------ Comment(by dev@…): Replying to [comment:3 lsansonetti@…]:
Shorter to reproduce:
{{{ $ ./miniruby -e "p Marshal.dump({})" unknown: [BUG] Segmentation fault MacRuby version 0.5 (ruby 1.9.0) [universal-darwin10.0, x86_64]
Abort trap }}}
Hey, I had the same error yesterday! Today it is working, fine! :-) What I am really missing is the backtrace, especially for a foreign piece of code. Yesterday I tried to run nanoc3 with macruby (just for fun): It throws an exception and I don´t know in which file. No chance for me to find the problem... -- Ticket URL: <http://www.macruby.org/trac/ticket/321#comment:5> MacRuby <http://macruby.org/>
#321: macgem crashes with "unknown: [BUG] Segmentation fault". ---------------------------+------------------------------------------------ Reporter: occam@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: major | Milestone: MacRuby 0.5 Component: MacRuby | Resolution: fixed Keywords: | ---------------------------+------------------------------------------------ Comment(by lsansonetti@…): Yeah, backtrace/symbolication is now high on the todo list... :) -- Ticket URL: <http://www.macruby.org/trac/ticket/321#comment:6> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby