[MacRuby] #1064: Segfault occurs when use a clone object with OpenStruct.
#1064: Segfault occurs when use a clone object with OpenStruct. ----------------------------------+----------------------------------------- Reporter: watson1978@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Test Script: {{{ #!ruby require 'ostruct' @os = OpenStruct.new(:name => "John Smith", :age => 70, :pension => 300) f = @os.clone p f.age # .should == 70 }}} BackTrace: {{{ $ DYLD_LIBRARY_PATH=. gdb --args ./macruby ~/tmp/tt.rb Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000119 0x00007fff800075f0 in object_getClass () (gdb) bt #0 0x00007fff800075f0 in object_getClass () #1 0x00000001000d20da in rb_objc_convert_immediate (obj=0x119) at objc.m:539 #2 0x000000010014518a in rb_ocid_to_rval (obj=0x119) at objc.h:247 #3 0x00000001001451c5 in builtin_ostub1 (imp=0x103304a30, self=0x200022c80, sel=0x102e8dd70, argc=0, argv=0x0) at vm.cpp:4818 #4 0x0000000100138dad in rb_vm_dispatch () at dispatcher.cpp:480 #5 0x0000000103300b26 in ?? () #6 0x00000001033001bc in ?? () #7 0x000000010015268d in rb_vm_run (fname=0x20004e9e0 "/Users/watson/tmp/tt.rb", node=0x2000369a0, binding=0x0, inside_eval=false) at vm.cpp:3943 #8 0x0000000100038d71 in ruby_run_node (n=0x2000369a0) at eval.c:211 #9 0x0000000100000c15 in main (argc=2, argv=0x100e1de40, envp=0x7fff5fbfee78) at main.cpp:40 (gdb) }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/1064> MacRuby <http://macruby.org/>
#1064: Segfault occurs when use a clone object with OpenStruct. ----------------------------------+----------------------------------------- Reporter: watson1978@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by lsansonetti@…): Apparently, #initialize_copy is never called. -- Ticket URL: <http://www.macruby.org/trac/ticket/1064#comment:1> MacRuby <http://macruby.org/>
#1064: Segfault occurs when use a clone object with OpenStruct. ----------------------------------+----------------------------------------- Reporter: watson1978@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: blocker | Milestone: Component: MacRuby | Resolution: fixed Keywords: | ----------------------------------+----------------------------------------- Changes (by watson1978@…): * status: new => closed * resolution: => fixed Comment: This issue does not reproduce no longer with latest. {{{ $ cat tt.rb require 'ostruct' @os = OpenStruct.new(:name => "John Smith", :age => 70, :pension => 300) f = @os.clone p f.age # .should == 70 $ macruby -v tt.rb MacRuby 0.12 (ruby 1.9.2) [universal-darwin11.0, x86_64] 70 }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/1064#comment:2> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby