From: nobu.nokada@... Date: 2003-06-05T17:24:32+09:00 Subject: Re: YAML problem Hi, At Thu, 5 Jun 2003 14:49:15 +0900, why the lucky stiff wrote: > > % ruby -ryaml -e 'a = []; 1000.times { a << {"a"=>"b","c"=>"d"} }; puts a.to_yaml'|ruby -ryaml -e 'YAML.load(STDIN)' > > zsh: done ruby -ryaml -e | > > zsh: segmentation fault (core dumped) ruby -ryaml -e 'YAML.load(STDIN)' > > Marshal had the same problem years ago (see [ruby-dev:8067]). I used > Matz' fix in [ruby-dev:8068]. > > This appeared to be a problem with GC nodes being used in rb_hash_aset. > I don't understand, since rb_ary_store didn't experience the same problems. > Matz knows these secrets. Seems that porinters to local variables would be stored in parser and left staying. This will cause GC crashed. And I guess volatile `hash' might be unnecessary, also one in marshal_load(). -- Nobu Nakada