Ruby Issue Tracking System: Issueshttps://redmine.ruby-lang.org/https://redmine.ruby-lang.org/favicon.ico?17113305112012-08-20T10:32:49ZRuby Issue Tracking System
Redmine Ruby master - Bug #6892 (Third Party's Issue): segfault of interpreter (possibly related to libxm...https://redmine.ruby-lang.org/issues/68922012-08-20T10:32:49Zbzaborow (Bartosz Zaborowski)bzaborow@mail.ru
<p>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.<br>
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.</p>
<p>Steps to reproduce:</p>
<ol start="0">
<li>gem install libxml-ruby</li>
<li>untar the archive, cd into libxml-ruby-bug/test directory</li>
<li>run ../crash.rb</li>
<li>wait a bit</li>
<li>bang!</li>
</ol>
<p>2a. If ../crash.rb doesn't fail, try ../full_script.rb (more messy code, but segfaults every time for me).</p>
<p>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.<br>
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.</p>
<p>My system info:</p>
<p>gentoo distro, ruby interpreter installed from distro, libxml-ruby (2.3.3) installed with gem; libxml2 version: 2.8.0<br>
gcc (Gentoo 4.5.3-r2 p1.5, pie-0.4.7) 4.5.3<br>
CFLAGS="-march=native -O2 -pipe"</p>