Projects

Ticket #404 (new defect)

Opened 2 years ago

Last modified 14 months ago

Segfault with ObjectSpace#each_object

Reported by: keith.gautreaux@… Owned by: lsansonetti@…
Priority: blocker Milestone: MacRuby Later
Component: MacRuby Keywords: #reduction objectspace segfault
Cc:

Description

The following code causes a segfault on my machine (MacBookPro3,1):

 #!/usr/local/bin/macruby
ObjectSpace.each_object { |o| puts o }

Unfortunately, I am running the nightly build of MacRuby from  http://macruby.icoretech.org and it doesn't seem to allow backtrace generation with gdb when compiled with:

macrubyc -o macruby_test -a x86_64 macruby_test.rb

I also get a segfault when the code is run under macirb.

If someone who can generate backtraces could try that method and reproduce the segfault that would be great. If no one becomes available I can try compiling macruby from source and running a backtrace.

Change History

Changed 2 years ago by keith.gautreaux@…

This still occurs with the nightly build of MacRuby from 11/2/09, both compiled and interpreted.

Changed 2 years ago by lsansonetti@…

The problem is in #inspect actually, ObjectSpace exposes *all* objects even obscure Cocoa internal objects as well as not-inspectable CF subclasses.

The following should work for instance.

$ macruby -e "ObjectSpace.each_object { |o| p o.class }"

Changed 14 months ago by mattaimonetti@…

  • keywords #reduction added
  • milestone changed from MacRuby 0.5 to MacRuby Later

The problem still exists but it doesn't seem critical to me. Moving to after 1.0

Note: See TracTickets for help on using tickets.