Bug #728
closedSegmentation fault with Ruby 1.8.7-p22 from st_lookup
Description
=begin
Details are described in the:
http://rubyforge.org/tracker/?func=detail&atid=1698&aid=21185&group_id=426
I was asked to (re)file it into the new tracker.
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.
=end
Files
Updated by matz (Yukihiro Matsumoto) over 15 years ago
=begin
Hi,
In message "Re: [ruby-core:19746] [Bug #728] Segmentation fault with Ruby 1.8.7-p22 from st_lookup"
on Sun, 9 Nov 2008 01:34:32 +0900, Martin Krauskopf redmine@ruby-lang.org writes:
|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.
I couldn't reproduce the problem. Do I have to use version 0.2.1 of
ruby-debug-ide? I used 0.4.0.
matz.
=end
Updated by mkrauskopf (Martin Krauskopf) over 15 years ago
=begin
Hi Matz,
I still can with the latest 1.8.7 and ruby-debug-ide-0.4.2 (latest).
First terminal:
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
Second terminal:
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="#<IterativeFibonacci:0xb7b09598>" type="IterativeFibonacci" hasChildren="false" objectId="-0x2427b534"/>Connection closed by foreign host.
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.
(sorry for late response, I was not notified abou the update of the issue, will try to fix my account)
=end
Updated by shyouhei (Shyouhei Urabe) about 15 years ago
- Assignee set to matz (Yukihiro Matsumoto)
=begin
=end
Updated by john_firebaugh (John Firebaugh) over 14 years ago
=begin
Anyone working on this? It seems to a problem for many people:
http://rubyforge.org/tracker/index.php?func=detail&aid=27114&group_id=3085&atid=11903
http://rubyforge.org/tracker/index.php?func=detail&aid=24415&group_id=1900&atid=7436
http://support.aptana.com/asap/browse/ROR-279
http://forums.netbeans.org/topic5276.html
http://www.jetbrains.net/devnet/thread/281342
http://www.jetbrains.net/devnet/thread/280357
http://www.jetbrains.net/devnet/thread/280366
=end
Updated by nobu (Nobuyoshi Nakada) over 14 years ago
- Status changed from Open to Third Party's Issue
- ruby -v set to ruby-debug-ide-0.4.2
=begin
=end
Updated by enDal (Dennis Ushakov) over 13 years ago
- File backtrace.txt backtrace.txt added
=begin
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
=end
Updated by enDal (Dennis Ushakov) over 13 years ago
=begin
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?
=end