https://redmine.ruby-lang.org/https://redmine.ruby-lang.org/favicon.ico?17113305112008-11-10T06:31:18ZRuby Issue Tracking SystemBackport187 - Bug #728: Segmentation fault with Ruby 1.8.7-p22 from st_lookuphttps://redmine.ruby-lang.org/issues/728?journal_id=15702008-11-10T06:31:18Zmatz (Yukihiro Matsumoto)matz@ruby.or.jp
<ul></ul><p>=begin<br>
Hi,</p>
<p>In message "Re: <a href="/issues/728">[ruby-core:19746]</a> [Bug <a class="issue tracker-1 status-8 priority-4 priority-default closed" title="Bug: Segmentation fault with Ruby 1.8.7-p22 from st_lookup (Third Party's Issue)" href="https://redmine.ruby-lang.org/issues/728">#728</a>] Segmentation fault with Ruby 1.8.7-p22 from st_lookup"<br>
on Sun, 9 Nov 2008 01:34:32 +0900, Martin Krauskopf <a href="mailto:redmine@ruby-lang.org" class="email">redmine@ruby-lang.org</a> writes:</p>
<p>|Still reproducible with ruby 1.8.7, patchlevel 72 as described there. Let me know if you can't reproduce and/or want a new backtrace.</p>
<p>I couldn't reproduce the problem. Do I have to use version 0.2.1 of<br>
ruby-debug-ide? I used 0.4.0.</p>
<pre><code> matz.
</code></pre>
<p>=end</p> Backport187 - Bug #728: Segmentation fault with Ruby 1.8.7-p22 from st_lookuphttps://redmine.ruby-lang.org/issues/728?journal_id=17122008-11-25T23:53:45Zmkrauskopf (Martin Krauskopf)martin.krauskopf@gmail.com
<ul></ul><p>=begin<br>
Hi Matz,</p>
<p>I still can with the latest 1.8.7 and ruby-debug-ide-0.4.2 (latest).</p>
<p>First terminal:</p>
<pre><code> emdot@ubuntbook:~/tmp/segfault$ cat tester.rb
class IterativeFibonacci
def value(n)
iterative_fib(n, 0, 1)
end
def iterative_fib(n, f1, f2)
return f2 if n < 2
iterative_fib(n - 1, f2, (f1 + f2))
end
end
p IterativeFibonacci.new.value(24)
emdot@ubuntbook:~/tmp/segfault$ ruby `which rdebug-ide` -p 12345 -- tester.rb
Fast Debugger (ruby-debug-ide 0.4.2) listens on localhost:12345
/space/ruby/gem-repo/gems/ruby-debug-ide-0.4.2/lib/ruby-debug/xml_printer.rb:106: [BUG] Segmentation fault
ruby 1.8.7 (2008-08-11 patchlevel 72) [i686-linux]
Aborted
</code></pre>
<p>Second terminal:</p>
<pre><code> emdot@ubuntbook:~$ telnet localhost 12345
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
b tester.rb:7
<breakpointAdded no="1" location="tester.rb:7"/>start
<breakpoint file="tester.rb" line="7" threadId="1"/>c
<breakpoint file="tester.rb" line="7" threadId="1"/>c
<breakpoint file="tester.rb" line="7" threadId="1"/>c
<breakpoint file="tester.rb" line="7" threadId="1"/>frame 5; v l
<variables><variable name="self" kind="local" value="#&lt;IterativeFibonacci:0xb7b09598&gt;" type="IterativeFibonacci" hasChildren="false" objectId="-0x2427b534"/>Connection closed by foreign host.
</code></pre>
<p>As soon as I do 'frame 5; v l' the debugger backend in the first terminal segfaults. Let me know if I can provide more information.<br>
(sorry for late response, I was not notified abou the update of the issue, will try to fix my account)</p>
<p>=end</p> Backport187 - Bug #728: Segmentation fault with Ruby 1.8.7-p22 from st_lookuphttps://redmine.ruby-lang.org/issues/728?journal_id=29812009-02-03T11:33:39Zshyouhei (Shyouhei Urabe)shyouhei@ruby-lang.org
<ul><li><strong>Assignee</strong> set to <i>matz (Yukihiro Matsumoto)</i></li></ul><p>=begin</p>
<p>=end</p> Backport187 - Bug #728: Segmentation fault with Ruby 1.8.7-p22 from st_lookuphttps://redmine.ruby-lang.org/issues/728?journal_id=64282009-10-25T06:55:15Zjohn_firebaugh (John Firebaugh)john.firebaugh@gmail.com
<ul></ul><p>=begin<br>
Anyone working on this? It seems to a problem for many people:</p>
<p><a href="http://rubyforge.org/tracker/index.php?func=detail&aid=27114&group_id=3085&atid=11903" class="external">http://rubyforge.org/tracker/index.php?func=detail&aid=27114&group_id=3085&atid=11903</a><br>
<a href="http://rubyforge.org/tracker/index.php?func=detail&aid=24415&group_id=1900&atid=7436" class="external">http://rubyforge.org/tracker/index.php?func=detail&aid=24415&group_id=1900&atid=7436</a><br>
<a href="http://support.aptana.com/asap/browse/ROR-279" class="external">http://support.aptana.com/asap/browse/ROR-279</a><br>
<a href="http://forums.netbeans.org/topic5276.html" class="external">http://forums.netbeans.org/topic5276.html</a><br>
<a href="http://www.jetbrains.net/devnet/thread/281342" class="external">http://www.jetbrains.net/devnet/thread/281342</a><br>
<a href="http://www.jetbrains.net/devnet/thread/280357" class="external">http://www.jetbrains.net/devnet/thread/280357</a><br>
<a href="http://www.jetbrains.net/devnet/thread/280366" class="external">http://www.jetbrains.net/devnet/thread/280366</a><br>
=end</p> Backport187 - Bug #728: Segmentation fault with Ruby 1.8.7-p22 from st_lookuphttps://redmine.ruby-lang.org/issues/728?journal_id=64302009-10-25T09:41:45Znobu (Nobuyoshi Nakada)nobu@ruby-lang.org
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Third Party's Issue</i></li><li><strong>ruby -v</strong> set to <i>ruby-debug-ide-0.4.2</i></li></ul><p>=begin</p>
<p>=end</p> Backport187 - Bug #728: Segmentation fault with Ruby 1.8.7-p22 from st_lookuphttps://redmine.ruby-lang.org/issues/728?journal_id=140542010-11-05T22:39:54ZenDal (Dennis Ushakov)dennis.ushakov@gmail.com
<ul><li><strong>File</strong> <a href="/attachments/1286">backtrace.txt</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/1286/backtrace.txt">backtrace.txt</a> added</li></ul><p>=begin<br>
The problem is still reproducible with ruby-debug-ide 0.4.11 and ruby 1.8.7 p302. Please have a look at gdb backtrace attached<br>
=end</p> Backport187 - Bug #728: Segmentation fault with Ruby 1.8.7-p22 from st_lookuphttps://redmine.ruby-lang.org/issues/728?journal_id=140562010-11-06T02:01:25ZenDal (Dennis Ushakov)dennis.ushakov@gmail.com
<ul></ul><p>=begin<br>
Actually this problems happens because ruby-debug-base gem gets values from local variables which are not yet initialized. Ruby allocates memory for local variables without doing cleanup of that memory, so when trying to invoke == method on some garbage for uninitialized variable we get segfault. Can I tell Ruby to assign nil for variables when allocating from ruby-debug gem side? Or may be there's some way to check that local variable is not yet initialized?<br>
=end</p>