YAML Aborting with large data set?

Hi all,

I have a large document in yaml which I can’t load or dump using YAML in ruby
because it segfaults. I have searched the archives and I wonder if this
error is similar to that described in the ruby-talk thread “Syck 0.35 +
YAML.rb 0.60 – the 1st stable release”. However in that thread I believe
that multi-threaded scripts were the main cause for concern…

This bugs out on all of my development machines:

[martin@dorfl dev]$ ruby -v
ruby 1.8.1 (2003-12-25) [i686-linux]

[martin@dorfl dev]$ irb
irb(main):001:0> require “yaml”
=> true
irb(main):002:0> string = “hello world” * 2000
=> "hello worldhello worldhello worldhello worldhello wo… etc"
irb(main):003:0> data = string.to_yaml
/usr/local/lib/ruby/1.8/yaml/rubytypes.rb:315: [BUG] Segmentation fault
ruby 1.8.1 (2003-12-25) [i686-linux]

Aborted
[martin@dorfl dev]$

Can somebody else confirm that this is reproducable?

As I mentioned above - the document that I want to convert to/from YAML is
large. Is there a size limitation that I am unaware of with the current yaml
implementation?

Cheers,
Martin

···


Martin Hart
Arnclan Limited
53 Union Street
Dunstable, Beds
LU6 1EX
http://www.arnclanit.com

I have a large document in yaml which I can't load or dump using YAML in ruby
because it segfaults. I have searched the archives and I wonder if this
error is similar to that described in the ruby-talk thread "Syck 0.35 +
YAML.rb 0.60 -- the 1st stable release". However in that thread I believe
that multi-threaded scripts were the main cause for concern...

Best to use the CVS version of ruby, and see if you can reproduce the
problem.

Guy Decoux

The code you gave worked for me

ruby 1.8.1 (2004-01-08) [i386-cygwin]

It was happy with a multiplier of 20000 as well.

Cheers,
Gavin

···

On Sunday, February 22, 2004, 3:18:31 AM, Martin wrote:

Hi all,

I have a large document in yaml which I can’t load or dump using YAML in ruby
because it segfaults. I have searched the archives and I wonder if this
error is similar to that described in the ruby-talk thread “Syck 0.35 +
YAML.rb 0.60 – the 1st stable release”. However in that thread I believe
that multi-threaded scripts were the main cause for concern…

thanks for the quick response. Indeed ruby 1.9.0 does not have this problem.

Cheers,
Martin

···

On Saturday 21 February 2004 16:36, ts wrote:

Best to use the CVS version of ruby, and see if you can reproduce the
problem.