[MacRuby] #1065: Abort occurs when calls Marshal.dump with object of cloned class.
#1065: Abort occurs when calls Marshal.dump with object of cloned class. ----------------------------------+----------------------------------------- Reporter: watson1978@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Test Script: {{{ #!ruby StrClone = String.clone p Marshal.dump(StrClone.new("abc")) }}} BackTrace: {{{ uncaught Objective-C/C++ exception... 2010-12-19 04:35:08.092 macruby[68506:a0b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -length only defined for abstract class. Define -[RBAnonymous5 length]!' *** Call stack at first throw: ( 0 CoreFoundation 0x00007fff83de87b4 __exceptionPreprocess + 180 1 libobjc.A.dylib 0x00007fff8000d0f3 objc_exception_throw + 45 2 CoreFoundation 0x00007fff83de85d7 +[NSException raise:format:arguments:] + 103 3 CoreFoundation 0x00007fff83de8564 +[NSException raise:format:] + 148 4 Foundation 0x00007fff82c42535 NSRequestConcreteImplementation + 227 5 Foundation 0x00007fff82c77200 -[NSString length] + 19 6 libmacruby.1.9.2.dylib 0x00000001000fe2a2 w_object + 2914 7 libmacruby.1.9.2.dylib 0x00000001000fe7c3 dump + 19 8 libmacruby.1.9.2.dylib 0x0000000100151a35 rb_ensure + 37 9 libmacruby.1.9.2.dylib 0x00000001000fbdcc marshal_dump + 428 10 libmacruby.1.9.2.dylib 0x000000010014c325 rb_vm_dispatch + 6981 11 ??? 0x0000000102d5a546 0x0 + 4342523206 12 ??? 0x0000000102d5a150 0x0 + 4342522192 13 libmacruby.1.9.2.dylib 0x0000000100164153 rb_vm_run + 531 14 libmacruby.1.9.2.dylib 0x0000000100040fe0 ruby_run_node + 80 15 macruby 0x0000000100000d28 main + 152 16 macruby 0x0000000100000c88 start + 52 ) terminate called after throwing an instance of 'NSException' Program received signal SIGABRT, Aborted. 0x00007fff88411616 in __kill () (gdb) bt #0 0x00007fff88411616 in __kill () #1 0x00007fff884b1cca in abort () #2 0x00007fff8037b5d2 in __gnu_cxx::__verbose_terminate_handler () #3 0x00007fff80010d29 in _objc_terminate () #4 0x00007fff80379ae1 in __cxxabiv1::__terminate () #5 0x00007fff80379b16 in std::terminate () #6 0x000000010015a181 in rb_vm_print_current_exception () at vm.cpp:3787 #7 0x0000000100000d3c in main (argc=2, argv=0x100d1de40, envp=<value temporarily unavailable, due to optimizations>) at main.cpp:44 (gdb) }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/1065> MacRuby <http://macruby.org/>
#1065: Abort occurs when calls Marshal.dump with object of cloned class. ----------------------------------+----------------------------------------- Reporter: watson1978@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by jhemmelg@…): Reduction: {{{ StrClone = String.clone p StrClone.new("abc").length }}} with results: {{{ (gdb) run Starting program: /Users/jhemmelg/personalWork/MacRuby/macruby ../clone1065.rb Reading symbols for shared libraries .++++........................ done /Users/jhemmelg/personalWork/MacRuby/../clone1065.rb:2:in `<main>': NSInvalidArgumentException: *** -length only defined for abstract class. Define -[RBAnonymous5 length]! (RuntimeError) Program exited with code 01. }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/1065#comment:1> MacRuby <http://macruby.org/>
#1065: Abort occurs when calls Marshal.dump with object of cloned class. ----------------------------------+----------------------------------------- Reporter: watson1978@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by lsansonetti@…): Mmh… {{{ $ ./miniruby -e "X=String.clone; p X.new('foo')" unknown: [BUG] destination 0x4004a0308 isn't in the auto zone MacRuby 0.9 (ruby 1.9.2) [universal-darwin11.0, x86_64] Abort trap: 6 }}} Looks like #clone doesn't work well. -- Ticket URL: <http://www.macruby.org/trac/ticket/1065#comment:2> MacRuby <http://macruby.org/>
#1065: Abort occurs when calls Marshal.dump with object of cloned class. ----------------------------------+----------------------------------------- Reporter: watson1978@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by watson1978@…): Currently, {{{ $ ./miniruby -e "X=String.clone; p X.new('foo')" Assertion failed: (rb_klass_is_rstr(klass)), function str_alloc, file string.c, line 221. zsh: abort ./miniruby -e "X=String.clone; p X.new('foo')" $ ./miniruby -e "X=Array.clone; p X.new([1,2,3])" Assertion failed: (rb_klass_is_rary(klass)), function rary_alloc, file array.c, line 153. zsh: abort ./miniruby -e "X=Array.clone; p X.new([1,2,3])" $ ./miniruby -e "X=Hash.clone; p X.new({:foo=>12, :bar=>34})" Assertion failed: (rb_klass_is_rhash(klass)), function rhash_alloc, file hash.c, line 137. zsh: abort ./miniruby -e "X=Hash.clone; p X.new({:foo=>12, :bar=>34})" }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/1065#comment:3> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby