public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/46114] New: [4.6 regression] g++ SEGV when built with gld on Solaris 10+/x86
@ 2010-10-21 12:03 ro at gcc dot gnu.org
  2010-10-21 20:32 ` [Bug rtl-optimization/46114] " ro at gcc dot gnu.org
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: ro at gcc dot gnu.org @ 2010-10-21 12:03 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46114

           Summary: [4.6 regression] g++ SEGV when built with gld on
                    Solaris 10+/x86
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: rtl-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: ro@gcc.gnu.org
                CC: bernds@codesourcery.com
              Host: i386-pc-solaris2.1[01]
            Target: i386-pc-solaris2.1[01]
             Build: i386-pc-solaris2.1[01]


When I recently tried to bootstrap mainline on Solaris 11 (and later 10)/x86
with CVS gas and gld, many C++ testcases failed.  It turned out that g++
SEGVs like this:

% g++ gcc.o
Segmentation Fault

It crashes like this:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1 (LWP 1)]
generate_option (opt_index=902, arg=0x8074535 <error reading variable>, 
    value=1, lang_mask=65536, decoded=0x1)
    at /var/gcc/reghunt/trunk/gcc/opts-common.c:862
862       decoded->arg = arg;
(gdb) where
#0  generate_option (opt_index=902, arg=0x8074535 <error reading variable>, 
    value=1, lang_mask=65536, decoded=0x1)
    at /var/gcc/reghunt/trunk/gcc/opts-common.c:862
#1  0x0805a9cb in lang_specific_driver (in_decoded_options=0x80474d8, 
    in_decoded_options_count=0x80474dc, in_added_libraries=0x8093744)
    at /var/gcc/reghunt/trunk/gcc/cp/g++spec.c:324
#2  0x0804c764 in process_command (decoded_options_count=2, 
    decoded_options=0x8093ff8) at /var/gcc/reghunt/trunk/gcc/gcc.c:3597
#3  0x08052f9a in main (argc=2, argv=0x8047664)
    at /var/gcc/reghunt/trunk/gcc/gcc.c:6214

i.e. decoded is invalid.  After searching around for a binutils change that
caused this, it turned out that the problem only happens when gas and gld
are in use, but also with gas/gld 2.20.1.  A gcc reghunt identified the
following patch as the culprit:

2010-09-23  Bernd Schmidt  <bernds@codesourcery.com>

        PR rtl-optimization/44374
        * basic-block.h (enum bb_flags): Add BB_MODIFIED.
        * df-core.c (df_set_bb_dirty): Set it.
        * ifcvt.c (find_memory): Remove function.
        (dead_or_predicable): Use can_move_insns_across.
        * df.h (can_move_insns_across): Declare function.
        * cfgcleanup.c (block_was_dirty): New static variable.
        (try_crossjump_bb, try_forward_edges): Test BB_MODIFIED flag rather
        than df_get_bb_dirty.
        (try_head_merge_bb): New static function.
        (try_optimize_cfg): Call it.  Call df_analyze if block_was_dirty
        is set.
        * df-problems.c: Include "target.h"
        (df_simulate_find_uses): New static function.
        (MEMREF_NORMAL, MEMREF_VOLATILE): New macros.
        (find_memory, find_memory_store): New static functions.
        (can_move_insns_across): New function.
        * Makefile.in (df-problems.o): Update dependencies.

I've not yet identified the mis-compilation caused.


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2010-11-25 16:25 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-21 12:03 [Bug rtl-optimization/46114] New: [4.6 regression] g++ SEGV when built with gld on Solaris 10+/x86 ro at gcc dot gnu.org
2010-10-21 20:32 ` [Bug rtl-optimization/46114] " ro at gcc dot gnu.org
2010-10-21 20:33 ` ro at gcc dot gnu.org
2010-10-21 20:36 ` ro at gcc dot gnu.org
2010-10-21 20:41 ` hjl.tools at gmail dot com
2010-10-21 20:58 ` ro at CeBiTec dot Uni-Bielefeld.DE
2010-10-21 23:34 ` bernds at gcc dot gnu.org
2010-10-22 10:09 ` ro at gcc dot gnu.org
2010-10-22 10:10 ` ro at gcc dot gnu.org
2010-10-22 10:15 ` ro at CeBiTec dot Uni-Bielefeld.DE
2010-10-22 13:25 ` bernds at gcc dot gnu.org
2010-10-22 13:35 ` ro at CeBiTec dot Uni-Bielefeld.DE
2010-11-03 15:38 ` rguenth at gcc dot gnu.org
2010-11-03 17:10 ` hjl.tools at gmail dot com
2010-11-04 18:48 ` ro at CeBiTec dot Uni-Bielefeld.DE
2010-11-08  7:31 ` steven at gcc dot gnu.org
2010-11-25 16:08 ` bernds at gcc dot gnu.org
2010-11-25 16:51 ` ro at CeBiTec dot Uni-Bielefeld.DE

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).