public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/40754] New: lto1 dies with SIGBUS/SIGSEGV on Solaris 11/SPARC
@ 2009-07-14 20:53 ro at gcc dot gnu dot org
2009-07-15 16:51 ` [Bug lto/40754] " ro at gcc dot gnu dot org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: ro at gcc dot gnu dot org @ 2009-07-14 20:53 UTC (permalink / raw)
To: gcc-bugs
Running the testsuite on sparc-sun-solaris2.11 with the lto branch as of
20090709
reveals many testsuite errors like this:
Executing on host:
/vol/gccsrc/obj/gcc-lto-20090709/11-gcc/gcc/testsuite/g++/../../g++
-B/vol/gccsrc/obj/gcc-lto-20090709/11-gcc/gcc/testsuite/g++/../../
cp_lto_20080709_0.o -nostdinc++
-I/vol/gccsrc/obj/gcc-lto-20090709/11-gcc/sparc-sun-solaris2.11/libstdc++-v3/include/sparc-sun-solaris2.11
-I/vol/gccsrc/obj/gcc-lto-20090709/11-gcc/sparc-sun-solaris2.11/libstdc++-v3/include
-I/vol/gcc/src/gcc-lto/libstdc++-v3/libsupc++
-I/vol/gcc/src/gcc-lto/libstdc++-v3/include/backward
-I/vol/gcc/src/gcc-lto/libstdc++-v3/testsuite/util -fmessage-length=0 -O0
-fwhopr
-L/vol/gccsrc/obj/gcc-lto-20090709/11-gcc/sparc-sun-solaris2.11/./libstdc++-v3/src/.libs
-L/vol/gccsrc/obj/gcc-lto-20090709/11-gcc/sparc-sun-solaris2.11/./libstdc++-v3/src/.libs
-L/vol/gccsrc/obj/gcc-lto-20090709/11-gcc/sparc-sun-solaris2.11/./libiberty
-lm -o g++-dg-lto-20080709-01 (timeout = 300)
lto1: internal compiler error: Bus Error
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make: *** [ccFjaiMJ-cp_lto_20080709_0.o.lto.ltrans.o] Error 1
lto1: fatal error:
/vol/gccsrc/obj/gcc-lto-20090709/11-gcc/gcc/testsuite/g++/../../ltrans-driver
terminated with status 512
compilation terminated.
lto-wrapper:
/vol/gccsrc/obj/gcc-lto-20090709/11-gcc/gcc/testsuite/g++/../../g++ returned 1
exit status
collect2: lto-wrapper returned 1 exit status
compiler exited with status 1
output is:
lto1: internal compiler error: Bus Error
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make: *** [ccFjaiMJ-cp_lto_20080709_0.o.lto.ltrans.o] Error 1
lto1: fatal error:
/vol/gccsrc/obj/gcc-lto-20090709/11-gcc/gcc/testsuite/g++/../../ltrans-driver
terminated with status 512
compilation terminated.
lto-wrapper:
/vol/gccsrc/obj/gcc-lto-20090709/11-gcc/gcc/testsuite/g++/../../g++ returned 1
exit status
collect2: lto-wrapper returned 1 exit status
FAIL: g++.dg/lto/20080709 cp_lto_20080709_0.o-cp_lto_20080709_0.o link,
(internal compiler error)
Running lto1 under gdb reveals
Program received signal SIGSEGV, Segmentation fault.
lto_main (debug_p=0) at /vol/gcc/src/gcc-lto/gcc/lto/lto.c:180
(gdb) where
#0 lto_main (debug_p=0) at /vol/gcc/src/gcc-lto/gcc/lto/lto.c:180
#1 0x003901e0 in toplev_main (argc=15, argv=0xffbff55c) at
/vol/gcc/src/gcc-lto/gcc/toplev.c:1039
#2 0x00097ee4 in _start ()
this can only happen if data (aka header) is NULL at this point, but gdb
cannot print them
--
Summary: lto1 dies with SIGBUS/SIGSEGV on Solaris 11/SPARC
Product: gcc
Version: lto
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: lto
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ro at gcc dot gnu dot org
GCC build triplet: sparc-sun-solaris2.11
GCC host triplet: sparc-sun-solaris2.11
GCC target triplet: sparc-sun-solaris2.11
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40754
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug lto/40754] lto1 dies with SIGBUS/SIGSEGV on Solaris 11/SPARC
2009-07-14 20:53 [Bug lto/40754] New: lto1 dies with SIGBUS/SIGSEGV on Solaris 11/SPARC ro at gcc dot gnu dot org
@ 2009-07-15 16:51 ` ro at gcc dot gnu dot org
2009-09-16 13:18 ` rguenth at gcc dot gnu dot org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: ro at gcc dot gnu dot org @ 2009-07-15 16:51 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from ro at gcc dot gnu dot org 2009-07-15 16:51 -------
I've rebuilt lto1 with just -g and re-run it under gdb. This is not a
NULL-pointer
dereference, but an improperly aligned pointer:
Starting program:
/vol/gccsrc/obj/gcc-lto-20090709/11-gcc/gcc/testsuite/g++/lto1 -quiet -dumpbase
cc0dayjK-cp_lto_20080709_0.o.lto.o -mcpu=v9 -auxbase-strip
./cc0dayjK-cp_lto_20080709_0.o.lto.ltrans.o -O0 -version
-fltrans-output-list=/var/tmp//cc.caijK.ltrans.out -fmessage-length=0 -fno-wpa
-fltrans ./cc0dayjK-cp_lto_20080709_0.o.lto.o -o /var/tmp//cccfaqkK.s
[New LWP 1 ]
warning: Lowest section in /lib/libdl.so.1 is .dynamic at 00000094
GNU GIMPLE (lto merged with rev 149291) version 4.5.0 20090706 (experimental)
[lto revision 149403] (sparc-sun-solaris2.11)
compiled by GNU C version 4.5.0 20090706 (experimental) [lto revision
149403], GMP version 4.2.1, MPFR version 2.3.2
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU GIMPLE (lto merged with rev 149291) version 4.5.0 20090706 (experimental)
[lto revision 149403] (sparc-sun-solaris2.11)
compiled by GNU C version 4.5.0 20090706 (experimental) [lto revision
149403], GMP version 4.2.1, MPFR version 2.3.2
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Program received signal SIGSEGV, Segmentation fault.
0x00118ca8 in lto_read_decls (decl_data=0xe4ecd0, data=0xff1b036d,
resolutions=0x0) at /vol/gcc/src/gcc-lto/gcc/lto/lto.c:179
1: x/i $pc
0x118ca8 <lto_read_decls+36>: ld [ %g1 + 8 ], %g2
(gdb) print/x $g1
$13 = 0xff1b036d
I haven't yet started to investiate further: this is probably much easier for
someone who's familiar with lto.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40754
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug lto/40754] lto1 dies with SIGBUS/SIGSEGV on Solaris 11/SPARC
2009-07-14 20:53 [Bug lto/40754] New: lto1 dies with SIGBUS/SIGSEGV on Solaris 11/SPARC ro at gcc dot gnu dot org
2009-07-15 16:51 ` [Bug lto/40754] " ro at gcc dot gnu dot org
@ 2009-09-16 13:18 ` rguenth at gcc dot gnu dot org
2009-09-29 12:09 ` rguenth at gcc dot gnu dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-09-16 13:18 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from rguenth at gcc dot gnu dot org 2009-09-16 13:17 -------
It looks like this:
/* Read in lto_in_decl_state objects. */
data_ptr = (const uint32_t *) ((const char*) data + decl_offset);
data_end =
(const uint32_t *) ((const char*) data_ptr + header->decl_state_size);
num_decl_states = *data_ptr++;
may be the reason.
I don't know what's easier - trying to properly align things or properly
accessing things.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40754
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug lto/40754] lto1 dies with SIGBUS/SIGSEGV on Solaris 11/SPARC
2009-07-14 20:53 [Bug lto/40754] New: lto1 dies with SIGBUS/SIGSEGV on Solaris 11/SPARC ro at gcc dot gnu dot org
2009-07-15 16:51 ` [Bug lto/40754] " ro at gcc dot gnu dot org
2009-09-16 13:18 ` rguenth at gcc dot gnu dot org
@ 2009-09-29 12:09 ` rguenth at gcc dot gnu dot org
2009-09-29 12:57 ` rguenth at gcc dot gnu dot org
2009-09-29 12:59 ` rguenth at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-09-29 12:09 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from rguenth at gcc dot gnu dot org 2009-09-29 12:09 -------
Hm. Even lto_read_file_options causes unaligned accesses in some cases. It
looks
like the ELF sections in the wpa files are no aligned:
Section Headers:
[Nr] Name Type Address Offset
Size EntSize Flags Link Info Align
[ 0] NULL 0000000000000000 00000000
0000000000000000 0000000000000000 0 0 0
[ 1] .gnu.lto_main PROGBITS 0000000000000000 00000040
00000000000002c8 0000000000000000 0 0 1
[ 2] .gnu.lto_myprintf PROGBITS 0000000000000000 00000308
0000000000000322 0000000000000000 0 0 1
[ 3] .gnu.lto_.cgraph PROGBITS 0000000000000000 0000062a
00000000000000c6 0000000000000000 0 0 1
...
properly aligning the data in lto_elf_append_data is needed, but only
for the first data block in a section.
I have a hack^Wpatch.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |rguenth at gcc dot gnu dot
|dot org |org
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2009-09-29 12:09:04
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40754
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug lto/40754] lto1 dies with SIGBUS/SIGSEGV on Solaris 11/SPARC
2009-07-14 20:53 [Bug lto/40754] New: lto1 dies with SIGBUS/SIGSEGV on Solaris 11/SPARC ro at gcc dot gnu dot org
` (2 preceding siblings ...)
2009-09-29 12:09 ` rguenth at gcc dot gnu dot org
@ 2009-09-29 12:57 ` rguenth at gcc dot gnu dot org
2009-09-29 12:59 ` rguenth at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-09-29 12:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from rguenth at gcc dot gnu dot org 2009-09-29 12:56 -------
Subject: Bug 40754
Author: rguenth
Date: Tue Sep 29 12:56:29 2009
New Revision: 152274
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=152274
Log:
2009-09-29 Richard Guenther <rguenther@suse.de>
PR lto/41467
* lto-symtab.c (lto_symtab_compatible): Fix typos.
PR lto/40392
* langhooks.c (lhd_begin_section): Do not align the section.
* config/rs6000/rs6000.c (rs6000_output_function_epilogue):
Handle LTO.
PR lto/40754
* lto-elf.c (init_shdr##BITS): Properly specify alignment
in bytes.
(first_data_block): New static variable.
(lto_elf_append_data): Align the first data block in each
section.
* lib/torture-options.exp: Do not append an empty option.
Modified:
branches/lto/gcc/ChangeLog.lto
branches/lto/gcc/config/rs6000/rs6000.c
branches/lto/gcc/langhooks.c
branches/lto/gcc/lto-symtab.c
branches/lto/gcc/lto/ChangeLog
branches/lto/gcc/lto/lto-elf.c
branches/lto/gcc/testsuite/ChangeLog.lto
branches/lto/gcc/testsuite/lib/torture-options.exp
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40754
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug lto/40754] lto1 dies with SIGBUS/SIGSEGV on Solaris 11/SPARC
2009-07-14 20:53 [Bug lto/40754] New: lto1 dies with SIGBUS/SIGSEGV on Solaris 11/SPARC ro at gcc dot gnu dot org
` (3 preceding siblings ...)
2009-09-29 12:57 ` rguenth at gcc dot gnu dot org
@ 2009-09-29 12:59 ` rguenth at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-09-29 12:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from rguenth at gcc dot gnu dot org 2009-09-29 12:58 -------
Fixed.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40754
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-09-29 12:58 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-14 20:53 [Bug lto/40754] New: lto1 dies with SIGBUS/SIGSEGV on Solaris 11/SPARC ro at gcc dot gnu dot org
2009-07-15 16:51 ` [Bug lto/40754] " ro at gcc dot gnu dot org
2009-09-16 13:18 ` rguenth at gcc dot gnu dot org
2009-09-29 12:09 ` rguenth at gcc dot gnu dot org
2009-09-29 12:57 ` rguenth at gcc dot gnu dot org
2009-09-29 12:59 ` rguenth at gcc dot gnu 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).