[MacRuby] #1152: Segfault occurs with JSON when redefined the initialize().
MacRuby
ruby-noreply at macosforge.org
Sun Feb 6 00:33:44 PST 2011
#1152: Segfault occurs with JSON when redefined the initialize().
----------------------------------+-----------------------------------------
Reporter: watson1978@… | Owner: lsansonetti@…
Type: defect | Status: new
Priority: blocker | Milestone:
Component: MacRuby | Keywords:
----------------------------------+-----------------------------------------
Likely CRuby 1.9.2, this problem occurs in MacRuby.[[BR]]
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/35079
Test Script:
{{{
#!ruby
require 'json'
module JSON
class Parser
def initialize; end
end
end
parser = JSON::Parser.new
parser.parse('test')
}}}
BackTrace:
{{{
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x000000000000003c
yajl_do_parse (hand=0x0, offset=0x7fff5fbfdd0c, jsonText=0x20004e640
"test", jsonTextLen=4) at yajl_parser.c:147
147 switch (yajl_bs_current(hand->stateStack)) {
(gdb) bt
#0 yajl_do_parse (hand=0x0, offset=0x7fff5fbfdd0c, jsonText=0x20004e640
"test", jsonTextLen=4) at yajl_parser.c:147
#1 0x0000000100df0e20 in yajl_parse (hand=<value temporarily unavailable,
due to optimizations>, jsonText=<value temporarily unavailable, due to
optimizations>, jsonTextLen=<value temporarily unavailable, due to
optimizations>) at yajl.c:127
#2 0x0000000100dee44e in json_parse_chunk [inlined] () at
/Users/watson/src/macruby-trunk-svn/ext/json/rubyext.c:235
#3 0x0000000100dee44e in rb_json_parser_parse (self=8590004160,
sel=<value temporarily unavailable, due to optimizations>, input=<value
temporarily unavailable, due to optimizations>) at rubyext.c:142
#4 0x000000010013b63e in __rb_vm_rcall [inlined] () at /Users/watson/src
/macruby-trunk-svn/dispatcher.cpp:161
#5 0x000000010013b63e in ruby_dispatch [inlined] () at /Users/watson/src
/macruby-trunk-svn/dispatcher.cpp:466
#6 0x000000010013b63e in rb_vm_dispatch () at dispatcher.cpp:850
#7 0x00000001033008f6 in ?? ()
#8 0x0000000103300183 in ?? ()
#9 0x0000000100155a2f in rb_vm_run (fname=0x2000412e0
"/Users/watson/tmp/test2.rb", node=0x20009a840, binding=0x0,
inside_eval=false) at vm.cpp:3930
#10 0x000000010003905b in ruby_run_node (n=0x20009a840) at eval.c:211
#11 0x0000000100000c15 in main (argc=3, argv=0x100e1de40,
envp=0x7fff5fbfee60) at main.cpp:40
Current language: auto; currently c
(gdb)
}}}
--
Ticket URL: <http://www.macruby.org/trac/ticket/1152>
MacRuby <http://macruby.org/>
More information about the macruby-tickets
mailing list