Segmentation fault with Ruby 1.8.7-p22 from st_lookup
Details are described in the:
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.
Updated by matz (Yukihiro Matsumoto) over 11 years ago
|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.
Updated by mkrauskopf (Martin Krauskopf) about 11 years ago
I still can with the latest 1.8.7 and ruby-debug-ide-0.4.2 (latest).
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
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)
Updated by john_firebaugh (John Firebaugh) over 10 years ago
Anyone working on this? It seems to a problem for many people:
Updated by enDal (Dennis Ushakov) over 9 years ago
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?