This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/23386] New: ICE: SIGSEGV at bitmap.c:780


In stage2, the following fault occurs:

mv tmp-libgcc.mk libgcc.mk
./xgcc -B./ -B/home/dave/opt/gnu/gcc/gcc-4.1.0/hppa-linux/bin/ -isystem /home/da
ve/opt/gnu/gcc/gcc-4.1.0/hppa-linux/include -isystem /home/dave/opt/gnu/gcc/gcc-
4.1.0/hppa-linux/sys-include -L/home/dave/gnu/gcc-4.0/objdir/gcc/../ld -O2 -O2 -
g -O2  -DIN_GCC    -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-protot
ypes -Wold-style-definition  -isystem ./include  -I. -I. -I../../gcc/gcc -I../..
/gcc/gcc/. -I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include   -g0 -f
inhibit-size-directive -fno-inline-functions -fno-exceptions -fno-zero-initializ
ed-in-bss -fno-unit-at-a-time   \
  -c ../../gcc/gcc/crtstuff.c -DCRT_BEGIN \
  -o crtbegin.o
xgcc: Internal error: Segmentation fault (program cc1)

(gdb) r `cat xx.sh`
Starting program: /home/dave/gnu/gcc-4.0/objdir/gcc/cc1 `cat xx.sh`
GNU C version 4.1.0 20050814 (experimental) (hppa-linux)
        compiled by GNU C version 4.1.0 20050814 (experimental).
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
options passed:  -I. -I. -I../../gcc/gcc -I../../gcc/gcc/.
 -I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include -iprefix
 -isystem -DIN_GCC -DCRT_BEGIN -isystem -isystem -isystem -auxbase-strip -g
 -g0 -O2 -O2 -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes
 -Wmissing-prototypes -Wold-style-definition -finhibit-size-directive
 -fno-inline-functions -fno-exceptions -fno-zero-initialized-in-bss
 -fno-unit-at-a-time
options enabled:  -falign-loops -fargument-alias -fbranch-count-reg
 -fcaller-saves -fcommon -fcprop-registers -fcrossjumping
 -fcse-follow-jumps -fcse-skip-blocks -fdefer-pop -fdelayed-branch
 -fdelete-null-pointer-checks -fearly-inlining
 -feliminate-unused-debug-types -fexpensive-optimizations -ffunction-cse
 -fgcse -fgcse-lm -fguess-branch-probability -fident -fif-conversion
 -fif-conversion2 -finhibit-size-directive -fipa-pure-const -fipa-reference
 -fipa-type-escape -fivopts -fkeep-static-consts -fleading-underscore
 -floop-optimize -floop-optimize2 -fmath-errno -fmerge-constants
 -fomit-frame-pointer -foptimize-register-move -foptimize-sibling-calls
 -fpeephole -fpeephole2 -freg-struct-return -fregmove -freorder-blocks
 -freorder-functions -frerun-cse-after-loop -frerun-loop-opt
 -fsched-interblock -fsched-spec -fsched-stalled-insns-dep -fschedule-insns
 -fschedule-insns2 -fshow-column -fsplit-ivs-in-unroller -fstrength-reduce
 -fstrict-aliasing -fthread-jumps -ftrapping-math -ftree-ccp -ftree-ch
 -ftree-copy-prop -ftree-copyrename -ftree-dce -ftree-dominator-opts
 -ftree-dse -ftree-fre -ftree-loop-im -ftree-loop-ivcanon
 -ftree-loop-optimize -ftree-lrs -ftree-pre -ftree-salias -ftree-sink
 -ftree-sra -ftree-store-ccp -ftree-store-copy-prop -ftree-ter -ftree-vrp
 -fvar-tracking -mbig-switch -mgas -mno-space-regs
Compiler executable checksum: f95f669b69fe7f9c73b928e96fbc74e7
 vprintf getchar getc_unlocked getchar_unlocked putchar fputc_unlocked 
putc_unlocked putchar_unlocked getline feof_unlocked ferror_unlocked __strcspn_c1 
__strcspn_c2 __strcspn_c3 __strspn_c1 __strspn_c2 __strspn_c3 __strpbrk_c2 
__strpbrk_c3 __strtok_r_1c __strsep_1c __strsep_2c __strsep_3c strtod strtol 
strtoul strtof strtold strtoq strtouq strtoll strtoull atof atoi atol atoll 
get_cie next_fde last_fde __do_global_dtors_aux
Program received signal SIGSEGV, Segmentation fault.
bitmap_and_compl_into (a=0x5999fc, b=Variable "b" is not available.
) at ../../gcc/gcc/bitmap.c:780
780                   BITMAP_WORD cleared = a_elt->bits[ix] & b_elt->bits[ix];

(gdb) p/x $pc
$3 = 0x12fcd4

0x0012fcd4 <bitmap_and_compl_into+212>: ldw 18(,r20),r19

(gdb) p/x $r20
$2 = 0x4e1fe4
(gdb) x/x 0x4e1fe4
0x4e1fe4:       Cannot access memory at address 0x4e1fe4

(gdb) bt
#0  bitmap_and_compl_into (a=0x5999fc, b=Variable "b" is not available.
) at ../../gcc/gcc/bitmap.c:780
#1  0x000c5540 in insert_phi_nodes_for (var=0x403e2898,
    phi_insertion_points=0x5999fc, update_p=1 '\001')
    at ../../gcc/gcc/tree-into-ssa.c:806
#2  0x000c6074 in insert_updated_phi_nodes_for (var=0x403e2898, dfs=0x80,
    blocks=0x5998a4, update_flags=2) at ../../gcc/gcc/tree-into-ssa.c:2476
#3  0x000c9b84 in update_ssa (update_flags=128)
    at ../../gcc/gcc/tree-into-ssa.c:2771

My first guess is that this loop has been miscompiled:

         for (ix = BITMAP_ELEMENT_WORDS; ix--;)
            {
              BITMAP_WORD cleared = a_elt->bits[ix] & b_elt->bits[ix];
              BITMAP_WORD r = a_elt->bits[ix] ^ cleared;

              a_elt->bits[ix] = r;
              changed |= cleared;
              ior |= r;
            }

In the call to bitmap_and_compl_into that fails, the loop iterates
94061 times before the SIGSEGV.

The last successful build was updated at Aug 13 01:18:00 UTC 2005.

-- 
           Summary: ICE: SIGSEGV at bitmap.c:780
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: danglin at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: hppa-unknown-linux-gnu
  GCC host triplet: hppa-unknown-linux-gnu
GCC target triplet: hppa-unknown-linux-gnu


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]