public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug optimization/11994] New: vax-netbsd build segfaults on unwind-dw2.c
@ 2003-08-20 18:21 dhazeghi at yahoo dot com
  2003-08-20 18:49 ` [Bug optimization/11994] [3.4 regression] " dhazeghi at yahoo dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: dhazeghi at yahoo dot com @ 2003-08-20 18:21 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: vax-netbsd build segfaults on unwind-dw2.c
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P2
         Component: optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dhazeghi at yahoo dot com
                CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: vax-netbsd

When building a cross (mainline 20030820) to vax-netbsd, build dies with:

./xgcc -B./ -B/tmp/dara//vax-netbsd/bin/ -isystem /tmp/dara//vax-netbsd/include
-isystem /tmp/dara//vax-netbsd/sys-include -L/tmp/mainline/objdir/gcc/../ld -O2
 -DIN_GCC -DCROSS_COMPILE   -W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-prototypes -isystem ./include   -g  -DIN_LIBGCC2
-D__GCC_FLOAT_NOT_NEEDED  -I. -I. -I../../gcc/gcc -I../../gcc/gcc/.
-I../../gcc/gcc/config -I../../gcc/gcc/../include  -fexceptions -c
../../gcc/gcc/unwind-dw2.c -o libgcc/./unwind-dw2.o
In file included from ../../gcc/gcc/unwind-dw2.c:37:
../../gcc/gcc/unwind-pe.h: In function `size_of_encoded_value':

../../gcc/gcc/unwind-pe.h:88: internal compiler error: Segmentation fault

If the optimization level is decreases to -O1 or lower, the crash goes away.

Here's the testcase (it seems very fragile):

#define DW_EH_PE_absptr         0x00
#define DW_EH_PE_omit           0xff

#define DW_EH_PE_udata2         0x02
#define DW_EH_PE_udata4         0x03
#define DW_EH_PE_udata8         0x04

static unsigned int
size_of_encoded_value (unsigned char encoding)
{

  switch (encoding & 0x07)
    {
    case DW_EH_PE_absptr:
      return sizeof (void *);
    case DW_EH_PE_udata2:
      return 2;
    case DW_EH_PE_udata4:
    case DW_EH_PE_udata8:
      return 8;
    }
  __gxx_abort ();
}


This can be reproduced just with a cross cc1.

Here's the backtrace:
#0  label_is_jump_target_p (label=0x40161280, jump_insn=0x401a2d00)
    at ../../gcc/gcc/cfgcleanup.c:643
#1  0x08205ccd in try_optimize_cfg (mode=256) at ../../gcc/gcc/cfgcleanup.c:1720
#2  0x08205de1 in cleanup_cfg (mode=256) at ../../gcc/gcc/cfgcleanup.c:1891
#3  0x080b93ba in cfg_layout_initialize () at ../../gcc/gcc/cfglayout.c:1128
#4  0x081ffbdb in reorder_basic_blocks () at ../../gcc/gcc/bb-reorder.c:1067
#5  0x081d1c2d in rest_of_handle_reorder_blocks (decl=0x401a0b64, 
    insns=0x4015e3e0) at ../../gcc/gcc/toplev.c:2201
#6  0x081d3805 in rest_of_compilation (decl=0x401a0b64)
    at ../../gcc/gcc/toplev.c:3401
#7  0x08063a9f in c_expand_body_1 (fndecl=0x401a0b64, nested_p=0)
    at ../../gcc/gcc/c-decl.c:6329
#8  0x08063ec8 in c_expand_body (fndecl=0x401a0b64) at ../../gcc/gcc/c-decl.c:6411
#9  0x08063692 in finish_function (nested=0, can_defer_p=1)
    at ../../gcc/gcc/c-decl.c:6199
#10 0x0804a3cb in yyparse () at c-parse.y:385
#11 0x0804e417 in c_parse_file () at c-parse.y:3015
#12 0x0808754d in c_common_parse_file (set_yydebug=1)
    at ../../gcc/gcc/c-opts.c:1210
#13 0x081d1222 in compile_file () at ../../gcc/gcc/toplev.c:1730
#14 0x081d4cec in do_compile () at ../../gcc/gcc/toplev.c:4407
#15 0x081d4dc5 in toplev_main (argc=3, argv=0xbffff104)
    at ../../gcc/gcc/toplev.c:4447
#16 0x080a0dbb in main (argc=3, argv=0xbffff104) at ../../gcc/gcc/main.c:35


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

* [Bug optimization/11994] [3.4 regression] vax-netbsd build segfaults on unwind-dw2.c
  2003-08-20 18:21 [Bug optimization/11994] New: vax-netbsd build segfaults on unwind-dw2.c dhazeghi at yahoo dot com
@ 2003-08-20 18:49 ` dhazeghi at yahoo dot com
  2003-08-23  2:58 ` [Bug optimization/11994] [3.4 regression] [cfg] " pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: dhazeghi at yahoo dot com @ 2003-08-20 18:49 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


dhazeghi at yahoo dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|vax-netbsd build segfaults  |[3.4 regression] vax-netbsd
                   |on unwind-dw2.c             |build segfaults on unwind-
                   |                            |dw2.c


------- Additional Comments From dhazeghi at yahoo dot com  2003-08-20 18:49 -------
Works fine with 3.3 branch (20030820).


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

* [Bug optimization/11994] [3.4 regression] [cfg] vax-netbsd build segfaults on unwind-dw2.c
  2003-08-20 18:21 [Bug optimization/11994] New: vax-netbsd build segfaults on unwind-dw2.c dhazeghi at yahoo dot com
  2003-08-20 18:49 ` [Bug optimization/11994] [3.4 regression] " dhazeghi at yahoo dot com
@ 2003-08-23  2:58 ` pinskia at gcc dot gnu dot org
  2003-09-17 13:53 ` rakdver at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-08-23  2:58 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |critical
           Priority|P2                          |P1
            Summary|[3.4 regression] vax-netbsd |[3.4 regression] [cfg] vax-
                   |build segfaults on unwind-  |netbsd build segfaults on
                   |dw2.c                       |unwind-dw2.c


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

* [Bug optimization/11994] [3.4 regression] [cfg] vax-netbsd build segfaults on unwind-dw2.c
  2003-08-20 18:21 [Bug optimization/11994] New: vax-netbsd build segfaults on unwind-dw2.c dhazeghi at yahoo dot com
  2003-08-20 18:49 ` [Bug optimization/11994] [3.4 regression] " dhazeghi at yahoo dot com
  2003-08-23  2:58 ` [Bug optimization/11994] [3.4 regression] [cfg] " pinskia at gcc dot gnu dot org
@ 2003-09-17 13:53 ` rakdver at gcc dot gnu dot org
  2003-09-18  7:13 ` pinskia at gcc dot gnu dot org
  2003-09-27 16:33 ` dhazeghi at yahoo dot com
  4 siblings, 0 replies; 6+ messages in thread
From: rakdver at gcc dot gnu dot org @ 2003-09-17 13:53 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From rakdver at gcc dot gnu dot org  2003-09-17 12:51 -------
Does not reproduce for me (mainline 20030917)


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

* [Bug optimization/11994] [3.4 regression] [cfg] vax-netbsd build segfaults on unwind-dw2.c
  2003-08-20 18:21 [Bug optimization/11994] New: vax-netbsd build segfaults on unwind-dw2.c dhazeghi at yahoo dot com
                   ` (2 preceding siblings ...)
  2003-09-17 13:53 ` rakdver at gcc dot gnu dot org
@ 2003-09-18  7:13 ` pinskia at gcc dot gnu dot org
  2003-09-27 16:33 ` dhazeghi at yahoo dot com
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-09-18  7:13 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-09-18 06:36 -------
I know you are on vaction and I know Stanford starts next week.
Can you retry this as it looks to be fixed already?


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

* [Bug optimization/11994] [3.4 regression] [cfg] vax-netbsd build segfaults on unwind-dw2.c
  2003-08-20 18:21 [Bug optimization/11994] New: vax-netbsd build segfaults on unwind-dw2.c dhazeghi at yahoo dot com
                   ` (3 preceding siblings ...)
  2003-09-18  7:13 ` pinskia at gcc dot gnu dot org
@ 2003-09-27 16:33 ` dhazeghi at yahoo dot com
  4 siblings, 0 replies; 6+ messages in thread
From: dhazeghi at yahoo dot com @ 2003-09-27 16:33 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


dhazeghi at yahoo dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |FIXED


------- Additional Comments From dhazeghi at yahoo dot com  2003-09-27 15:22 -------
I can't reproduce either with mainline (20030920). Closing...


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

end of thread, other threads:[~2003-09-27 15:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-20 18:21 [Bug optimization/11994] New: vax-netbsd build segfaults on unwind-dw2.c dhazeghi at yahoo dot com
2003-08-20 18:49 ` [Bug optimization/11994] [3.4 regression] " dhazeghi at yahoo dot com
2003-08-23  2:58 ` [Bug optimization/11994] [3.4 regression] [cfg] " pinskia at gcc dot gnu dot org
2003-09-17 13:53 ` rakdver at gcc dot gnu dot org
2003-09-18  7:13 ` pinskia at gcc dot gnu dot org
2003-09-27 16:33 ` dhazeghi at yahoo dot com

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