A
Andrew Walrond
When dumping a Hash containing a string with a length greater than about 4100,
ruby segfaults:
...
4099
4100
4101
4102
4103
/pkg/ruby.2/lib/ruby/1.8/yaml.rb:193: [BUG] Segmentation fault
ruby 1.8.1 (2003-12-05) [i686-linux]
Easily reproduced here with simple test
#!/bin/ruby
require 'yaml'
len = 1
while true
a = {"test"=>'x'*len}
puts len
b = YAML.dump(a)
len += 1
end
I've tried two different machines; The magic number of one is 4103 and the
other is 4175
This is coincidentally close to a 4k buffer perhaps???
Andrew Walrond
ruby segfaults:
...
4099
4100
4101
4102
4103
/pkg/ruby.2/lib/ruby/1.8/yaml.rb:193: [BUG] Segmentation fault
ruby 1.8.1 (2003-12-05) [i686-linux]
Easily reproduced here with simple test
#!/bin/ruby
require 'yaml'
len = 1
while true
a = {"test"=>'x'*len}
puts len
b = YAML.dump(a)
len += 1
end
I've tried two different machines; The magic number of one is 4103 and the
other is 4175
This is coincidentally close to a 4k buffer perhaps???
Andrew Walrond