Issue #6892 has been updated by drbrain (Eric Hodel).


Can you reproduce the segfault without loading libxml-ruby?
----------------------------------------
Bug #6892: segfault of interpreter (possibly related to libxml-ruby)
https://bugs.ruby-lang.org/issues/6892#change-28949

Author: bzaborow (Bartosz Zaborowski)
Status: Open
Priority: Normal
Assignee: 
Category: 
Target version: 
ruby -v: ruby 1.9.3p194 (2012-04-20 revision 35410)


I get a segfault of interpreter in some code of libxml-ruby extension. It is very susceptible to slight changes of my script, even totally unrelated to libxml-ruby, so I report it here.
Segfault is reproducible 90% of times on 2 different computers with different linux distros. Segfault message is attached as well as the code and data needed to reproduce.

Steps to reproduce:

0. gem install libxml-ruby
1. untar the archive, cd into libxml-ruby-bug/test directory
2. run ../crash.rb
3. wait a bit
4. bang!

2a. If ../crash.rb doesn't fail, try ../full_script.rb (more messy code, but segfaults every time for me).

The crash.rb code is truncated a bit till it started to be sensitive even to such changes like removing of an empty, unused method. Unfortunately it is still large.
The script processes few sets of xml files. It doesn't crash when run on single set (or I didn't found such a set). The order of xmls processed also matters.

My system info:

gentoo distro, ruby interpreter installed from distro, libxml-ruby (2.3.3) installed with gem; libxml2 version: 2.8.0
gcc (Gentoo 4.5.3-r2 p1.5, pie-0.4.7) 4.5.3
CFLAGS="-march=native -O2 -pipe"



-- 
http://bugs.ruby-lang.org/