public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug regression/52383] New: gcc-4.6 regression: miscompiles Perl on m68k
@ 2012-02-25 22:54 tg at mirbsd dot org
2012-02-25 23:52 ` [Bug regression/52383] " tg at mirbsd dot org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: tg at mirbsd dot org @ 2012-02-25 22:54 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52383
Bug #: 52383
Summary: gcc-4.6 regression: miscompiles Perl on m68k
Classification: Unclassified
Product: gcc
Version: 4.6.2
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: regression
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: tg@mirbsd.org
Created attachment 26753
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26753
gzip’d tarball with preprocessed source and assembler output
Hi,
this was originally reported as:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=658050
The problem is that Perl misbehaves at runtime due to being miscompiled.
It is not reproducible without a native m68k system thus. Sorry about that.
I’ve tracked the problem down to one file. The failure mode is (“cc” is
gcc-4.6):
[…]
cc -c -DPERL_CORE -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-regmove
-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -Wall -W -Wextra
-Wdeclaration-after-statement -Wendif-labels -Wc++-compat -Wwrite-strings -fPIC
-DPERL_IS_MINIPERL -DPERL_EXTERNAL_GLOB perlmini.c
LD_LIBRARY_PATH=/tmp/buildd/perl-5.14.2 cc -fstack-protector -L/usr/local/lib
-o miniperl gv.o toke.o perly.o pad.o regcomp.o dump.o util.o mg.o reentr.o
mro.o keywords.o hv.o av.o run.o pp_hot.o sv.o pp.o scope.o pp_ctl.o pp_sys.o
doop.o doio.o regexec.o utf8.o taint.o deb.o universal.o globals.o perlio.o
perlapi.o numeric.o mathoms.o locale.o pp_pack.o pp_sort.o miniperlmain.o
opmini.o perlmini.o -ldl -lm -lpthread -lc -lcrypt
LD_LIBRARY_PATH=/tmp/buildd/perl-5.14.2 ./miniperl -Ilib make_patchnum.pl
Failure yields:
Out of memory during list extend at make_patchnum.pl line 126.
Success yields one of these (the first only once):
Updating 'git_version.h' and 'lib/Config_git.pl'
Reusing 'git_version.h' and 'lib/Config_git.pl'
I’ve attached the results of the following commands:
cc -c -DPERL_CORE -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-regmove
-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -Wall -W -Wextra
-Wdeclaration-after-statement -Wendif-labels -Wc++-compat -Wwrite-strings -fPIC
-DPERL_IS_MINIPERL -DPERL_EXTERNAL_GLOB perlmini.c -E -o perlmini.i
gcc-4.6 -S -O1 -fPIC perlmini.i -o perlmini.-O1.s
gcc-4.6 -S -O2 -fPIC perlmini.i -o perlmini.-O2.s
gcc-4.4 -S -O2 -fPIC perlmini.i -o perlmini.4_4.s
The following commands (plus linking and running) will fail:
gcc-4.6 -c -O2 -fPIC perlmini.i
The following commands (plus linking and running) will succeed:
gcc-4.6 -c -O1 -fPIC perlmini.i
gcc-4.4 -c -O2 -fPIC perlmini.i
So this is an optimisation bug (I think) in gcc-4.6 and a regression from
gcc-4.4 (the linking command uses gcc-4.6 in all cases as I’ve not changed it).
Naturally, these are not easily diff’able.
Version information:
gcc-4.6 a.k.a. cc is compiled from Debian 4.6.2-15 sources plus the (second)
bugfix from PR47612:
Using built-in specs.
Target: m68k-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.4.6-14'
--with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.4 --enable-shared --enable-linker-build-id
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4
--libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug
--disable-libssp --enable-objc-gc --disable-werror --disable-multilib
--enable-checking=release --build=m68k-linux-gnu --host=m68k-linux-gnu
--target=m68k-linux-gnu
Thread model: posix
gcc version 4.4.6 (Debian 4.4.6-14)
gcc-4.4 is compiled from unmodified Debian sid sources:
Using built-in specs.
Target: m68k-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.4.6-14'
--with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.4 --enable-shared --enable-linker-build-id
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4
--libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug
--disable-libssp --enable-objc-gc --disable-werror --disable-multilib
--enable-checking=release --build=m68k-linux-gnu --host=m68k-linux-gnu
--target=m68k-linux-gnu
Thread model: posix
gcc version 4.4.6 (Debian 4.4.6-14)
If you need me to copy out any more files from this chroot, or tar it up
entirely, or run tests; sure, can be done.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug regression/52383] gcc-4.6 regression: miscompiles Perl on m68k
2012-02-25 22:54 [Bug regression/52383] New: gcc-4.6 regression: miscompiles Perl on m68k tg at mirbsd dot org
@ 2012-02-25 23:52 ` tg at mirbsd dot org
2012-02-27 9:28 ` [Bug regression/52383] [4.6 Regression] " rguenth at gcc dot gnu.org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: tg at mirbsd dot org @ 2012-02-25 23:52 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52383
Thorsten Glaser <tg at mirbsd dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-code
Target| |m68k-linux-gnu
URL| |http://bugs.debian.org/cgi-
| |bin/bugreport.cgi?bug=65805
| |0
Known to work| |4.4.6
Host| |m68k-linux-gnu
Known to fail| |4.6.2
Build| |m68k-linux-gnu
--- Comment #1 from Thorsten Glaser <tg at mirbsd dot org> 2012-02-25 22:53:50 UTC ---
Sorry, mis-pasted. This is gcc-4.6 -v:
Using built-in specs.
COLLECT_GCC=gcc-4.6
COLLECT_LTO_WRAPPER=/usr/lib/gcc/m68k-linux-gnu/4.6/lto-wrapper
Target: m68k-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.6.2-15+m68k.1'
--with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.6 --enable-shared --enable-linker-build-id
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes --disable-libssp
--enable-plugin --enable-objc-gc --disable-werror --disable-multilib
--enable-checking=release --build=m68k-linux-gnu --host=m68k-linux-gnu
--target=m68k-linux-gnu
Thread model: posix
gcc version 4.6.2 (Debian 4.6.2-15+m68k.1)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug regression/52383] [4.6 Regression] miscompiles Perl on m68k
2012-02-25 22:54 [Bug regression/52383] New: gcc-4.6 regression: miscompiles Perl on m68k tg at mirbsd dot org
2012-02-25 23:52 ` [Bug regression/52383] " tg at mirbsd dot org
@ 2012-02-27 9:28 ` rguenth at gcc dot gnu.org
2012-03-02 17:13 ` schwab@linux-m68k.org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-02-27 9:28 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52383
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.6.4
Summary|gcc-4.6 regression: |[4.6 Regression]
|miscompiles Perl on m68k |miscompiles Perl on m68k
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug regression/52383] [4.6 Regression] miscompiles Perl on m68k
2012-02-25 22:54 [Bug regression/52383] New: gcc-4.6 regression: miscompiles Perl on m68k tg at mirbsd dot org
2012-02-25 23:52 ` [Bug regression/52383] " tg at mirbsd dot org
2012-02-27 9:28 ` [Bug regression/52383] [4.6 Regression] " rguenth at gcc dot gnu.org
@ 2012-03-02 17:13 ` schwab@linux-m68k.org
2012-03-03 15:50 ` tg at mirbsd dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: schwab@linux-m68k.org @ 2012-03-02 17:13 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52383
Andreas Schwab <schwab@linux-m68k.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Last reconfirmed| |2012-03-02
Ever Confirmed|0 |1
--- Comment #2 from Andreas Schwab <schwab@linux-m68k.org> 2012-03-02 17:13:36 UTC ---
I'm unable to reproduce that.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug regression/52383] [4.6 Regression] miscompiles Perl on m68k
2012-02-25 22:54 [Bug regression/52383] New: gcc-4.6 regression: miscompiles Perl on m68k tg at mirbsd dot org
` (2 preceding siblings ...)
2012-03-02 17:13 ` schwab@linux-m68k.org
@ 2012-03-03 15:50 ` tg at mirbsd dot org
2012-04-22 15:42 ` tg at mirbsd dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: tg at mirbsd dot org @ 2012-03-03 15:50 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52383
--- Comment #3 from Thorsten Glaser <tg at mirbsd dot org> 2012-03-03 15:50:06 UTC ---
Hrm. Building 4.6.3 now, to see whether it goes away.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug regression/52383] [4.6 Regression] miscompiles Perl on m68k
2012-02-25 22:54 [Bug regression/52383] New: gcc-4.6 regression: miscompiles Perl on m68k tg at mirbsd dot org
` (3 preceding siblings ...)
2012-03-03 15:50 ` tg at mirbsd dot org
@ 2012-04-22 15:42 ` tg at mirbsd dot org
2012-05-22 10:06 ` mikpe at it dot uu.se
2012-05-22 12:39 ` tg at mirbsd dot org
6 siblings, 0 replies; 8+ messages in thread
From: tg at mirbsd dot org @ 2012-04-22 15:42 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52383
Thorsten Glaser <tg at mirbsd dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution| |WORKSFORME
--- Comment #4 from Thorsten Glaser <tg at mirbsd dot org> 2012-04-22 15:41:44 UTC ---
Upgrading didn’t help, but in the meantime, I got it built.
I blame ARAnyM, as it succeeds on a box I put Petr’s .deb on…
so no wonder Andreas couldn’t reproduce it.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug regression/52383] [4.6 Regression] miscompiles Perl on m68k
2012-02-25 22:54 [Bug regression/52383] New: gcc-4.6 regression: miscompiles Perl on m68k tg at mirbsd dot org
` (4 preceding siblings ...)
2012-04-22 15:42 ` tg at mirbsd dot org
@ 2012-05-22 10:06 ` mikpe at it dot uu.se
2012-05-22 12:39 ` tg at mirbsd dot org
6 siblings, 0 replies; 8+ messages in thread
From: mikpe at it dot uu.se @ 2012-05-22 10:06 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52383
Mikael Pettersson <mikpe at it dot uu.se> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mikpe at it dot uu.se
--- Comment #5 from Mikael Pettersson <mikpe at it dot uu.se> 2012-05-22 08:35:14 UTC ---
(In reply to comment #4)
> Upgrading didn’t help, but in the meantime, I got it built.
> I blame ARAnyM, as it succeeds on a box I put Petr’s .deb on…
> so no wonder Andreas couldn’t reproduce it.
FWIW, I've just built perl-5.12.4 with gcc-4.6.3 (+ patches) on ARAnyM (0.9.11)
running a Linux 3.x kernel. It seems to work fine, and the make_patchnum.pl
error you mentioned did not occur. IOW, I'm more inclined to suspect Debian's
gcc-4.6 (at the time) than ARAnyM.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug regression/52383] [4.6 Regression] miscompiles Perl on m68k
2012-02-25 22:54 [Bug regression/52383] New: gcc-4.6 regression: miscompiles Perl on m68k tg at mirbsd dot org
` (5 preceding siblings ...)
2012-05-22 10:06 ` mikpe at it dot uu.se
@ 2012-05-22 12:39 ` tg at mirbsd dot org
6 siblings, 0 replies; 8+ messages in thread
From: tg at mirbsd dot org @ 2012-05-22 12:39 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52383
--- Comment #6 from Thorsten Glaser <tg at mirbsd dot org> 2012-05-22 12:17:36 UTC ---
Hm, I was pretty sure I tracked it down to aranym. But anyway, it’s gone.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2012-05-22 12:38 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-25 22:54 [Bug regression/52383] New: gcc-4.6 regression: miscompiles Perl on m68k tg at mirbsd dot org
2012-02-25 23:52 ` [Bug regression/52383] " tg at mirbsd dot org
2012-02-27 9:28 ` [Bug regression/52383] [4.6 Regression] " rguenth at gcc dot gnu.org
2012-03-02 17:13 ` schwab@linux-m68k.org
2012-03-03 15:50 ` tg at mirbsd dot org
2012-04-22 15:42 ` tg at mirbsd dot org
2012-05-22 10:06 ` mikpe at it dot uu.se
2012-05-22 12:39 ` tg at mirbsd dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).