Project

General

Profile

Actions

Bug #378

closed

rbconfig.rb:173: [BUG] Stack consistency error

Added by Anonymous over 16 years ago. Updated over 13 years ago.

Status:
Closed
Target version:
-
ruby -v:
Backport:
[ruby-core:18029]

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

log (2.02 KB) log Anonymous, 07/31/2008 02:55 AM
valgrind.log.gz (4.56 KB) valgrind.log.gz Log valgrind Zenithar (Thibault Normand), 08/07/2008 06:11 PM
gdb.log.gz (1.54 KB) gdb.log.gz Log gdb Zenithar (Thibault Normand), 08/07/2008 06:11 PM

Updated by Zenithar (Thibault Normand) over 16 years ago

=begin
Same problem on OpenSUSE 11.0 x64.
Try some valgrind / gdb pass to identify the problem
=end

Actions #2

Updated by ko1 (Koichi Sasada) over 16 years ago

  • Assignee set to ko1 (Koichi Sasada)

=begin

=end

Actions #3

Updated by mame (Yusuke Endoh) over 16 years ago

=begin
Hi,

2008/7/31 Anonymous :

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

=end

Actions #4

Updated by matz (Yukihiro Matsumoto) over 16 years ago

  • Status changed from Open to Closed
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0