Bug #378
closedrbconfig.rb:173: [BUG] Stack consistency error
Description
=begin
I've tried to compile ruby 1.9 svn HEAD on an openSUSE 11.0 and ran into a build problem with prelude.c Build log is attached.
=end
Files
Updated by Zenithar (Thibault Normand) over 16 years ago
- File valgrind.log.gz valgrind.log.gz added
- File gdb.log.gz gdb.log.gz added
=begin
Same problem on OpenSUSE 11.0 x64.
Try some valgrind / gdb pass to identify the problem
=end
Updated by mame (Yusuke Endoh) over 16 years ago
=begin
Hi,
2008/7/31 Anonymous redmine@ruby-lang.org:
I've tried to compile ruby 1.9 svn HEAD on an openSUSE 11.0 and ran into a build problem with prelude.c Build log is attached.
I duplicated the problem on openSUSE 11.0 on VMware on 32bit WindowsXP.
To simplify it, multiple assignment dumps core.
$ ./miniruby -e 'a, b = 1, 2'
-e:1: [BUG] Stack consistency error (sp: 10, bp: 8)
ruby 1.9.0 (2008-08-21 revision 18754) [i686-linux]
-- control frame ----------
c:0003 p:0013 s:0010 b:0008 l:000007 d:000007 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 :17
DBG> : "-e:1:in `'"
-- backtrace of native function call (Use addr2line) --
0x814f3f4
0x808069e
0x80806e8
0x81455b4
0x8145d24
0x8145f0c
0x8082a6f
0x8083d76
0x805ba00
0xb7eb05f5
0x805b901
Aborted
The cause is, the function REMOVE_ELEM in compile.c is certainly called
but seems not to work. I think gcc does wrong optimization because:
- if building with optflags="-O0", it works
- if adding attribute((noinline)) to REMOVE_ELEM, it works
- if building with gcc 4.3.1 built by myself, it works
So I suspect packaging issue of gcc in openSUSE 11.0 or gcc's own bug.
As a workaround, you may use ./configure optflags="-O0".
--
Yusuke ENDOH mame@tsg.ne.jp
=end
Updated by matz (Yukihiro Matsumoto) over 16 years ago
- Status changed from Open to Closed
=begin
gcc bug. see https://bugzilla.novell.com/show_bug.cgi?id=419260
=end