Project

General

Profile

Actions

Bug #513

closed

Tempfile yields [BUG] Stack consistency error

Added by shyouhei (Shyouhei Urabe) about 16 years ago. Updated over 13 years ago.

Status:
Closed
Target version:
-
ruby -v:
Backport:
[ruby-dev:36028]

Description

=begin
zsh % gdb --args ~/target/trunk/bin/ruby -rtempfile -ve
Tempfile.open("") do |f|
f.write "\n";
f.rewind;
g = Tempfile.new "";
f.each {break};
g.rewind;
end
'
GNU gdb 6.4.90-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1".

(gdb) run
Starting program: /home/shyouhei/target/trunk/bin/ruby -rtempfile -ve
Tempfile.open("")\ do\ |f|
\ f.write\ "\n";
\ f.rewind;
\ g\ =\ Tempfile.new\ "";
\ f.each\ {break};
\ g.rewind;
end\

[Thread debugging using libthread_db enabled]
[New Thread 47466447361456 (LWP 21474)]
[New Thread 1073756512 (LWP 21477)]
ruby 1.9.0 (2008-08-28 revision 17576) [x86_64-linux]
-e:1: [BUG] Stack consistency error (sp: 16, bp: 15)
ruby 1.9.0 (2008-08-28 revision 17576) [x86_64-linux]

-- control frame ----------
c:0005 p:0070 s:0016 b:0015 l:000148 d:0001d8 BLOCK -e:1
c:0004 p:0035 s:0011 b:0011 l:000010 d:000010 METHOD /home/shyouhei/target/trunk/lib/ruby/1.9.0/tempfile.rb:186
c:0003 p:0017 s:0006 b:0006 l:000148 d:000148 TOP -e:1
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH :private_class_method
c:0001 p:0000 s:0002 b:0002 l:000001 d:000001 TOP

DBG> : "-e:1:in block in <main>'" DBG> : "/home/shyouhei/target/trunk/lib/ruby/1.9.0/tempfile.rb:186:in open'"
DBG> : "-e:1:in `'"
-- backtrace of native function call (Use addr2line) --
0x4f5b51
0x51fa2f
0x51fb1f
0x4ee38f
0x4f2b2d
0x4f3337
0x41682f
0x4168de
0x415007
0x316ca1c4ca
0x414f1a

Program received signal SIGABRT, Aborted.
[Switching to Thread 47466447361456 (LWP 21474)]
0x000000316ca2f07b in raise () from /lib/libc.so.6
(gdb) bt
#0 0x000000316ca2f07b in raise () from /lib/libc.so.6
#1 0x000000316ca3084e in abort () from /lib/libc.so.6
#2 0x000000000051fb24 in rb_bug (fmt=0x564d80 "Stack consistency error (sp: %ld, bp: %ld)") at /home/shyouhei/ruby/trunk/error.c:226
#3 0x00000000004ee38f in vm_eval (th=0x6f0110, initial=0) at /home/shyouhei/ruby/trunk/insns.def:1061
#4 0x00000000004f2b2d in vm_eval_body (th=0x6f0110) at /home/shyouhei/ruby/trunk/vm.c:1062
#5 0x00000000004f3337 in rb_iseq_eval (iseqval=10262960) at /home/shyouhei/ruby/trunk/vm.c:1267
#6 0x000000000041682f in ruby_exec_node (n=0x9c99b0, file=0x0) at /home/shyouhei/ruby/trunk/eval.c:217
#7 0x00000000004168de in ruby_run_node (n=0x9c99b0) at /home/shyouhei/ruby/trunk/eval.c:245
#8 0x0000000000415007 in main (argc=4, argv=0x7fff05ef52b8) at /home/shyouhei/ruby/trunk/main.c:34
(gdb)
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0