#1059: Segfault occurs when send #initialize_copy to already initialized class. ----------------------------------+----------------------------------------- Reporter: watson1978@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- MacRuby should throw an exception, but Segfault occurs. Test Script: {{{ #!ruby # it "raises a TypeError when called on already initialized classes" Object.send :initialize_copy, String }}} BackTrace: {{{ $ DYLD_LIBRARY_PATH=. gdb --args ./macruby -I./lib ~/tmp/tt.rb Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000020 0x00007fff80016410 in class_setSuperclass () (gdb) bt #0 0x00007fff80016410 in class_setSuperclass () #1 0x0000000100028f20 in rb_mod_init_copy (clone=140735080617064, sel=0x0, orig=8590006368) at class.c:269 #2 0x0000000100029059 in rb_class_init_copy (clone=140735080617064, sel=0x100e243b0, orig=8590006368) at class.c:310 #3 0x00000001001381fa in __rb_vm_rcall [inlined] () at /Users/watson/src /macruby-trunk-svn/dispatcher.cpp:161 #4 0x00000001001381fa in ruby_dispatch [inlined] () at /Users/watson/src /macruby-trunk-svn/dispatcher.cpp:466 #5 0x00000001001381fa in rb_vm_dispatch () at dispatcher.cpp:849 #6 0x0000000103300406 in ?? () #7 0x00000001033000b7 in ?? () #8 0x000000010015268d in rb_vm_run (fname=0x200051140 "/Users/watson/tmp/tt.rb", node=0x20004eb40, binding=0x0, inside_eval=false) at vm.cpp:3943 #9 0x0000000100038d71 in ruby_run_node (n=0x20004eb40) at eval.c:211 #10 0x0000000100000c15 in main (argc=3, argv=0x100e1de30, envp=0x7fff5fbfee68) at main.cpp:40 (gdb) }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/1059> MacRuby <http://macruby.org/>