flow.c:make_edge() segfault testcase

Franz Sirl Franz.Sirl-kernel@lauterbach.com
Sun Apr 8 13:14:00 GMT 2001


Hi,

the attached testcase distilled from the screen package segfaults in 
make_edge:

(gdb) r -fpreprocessed acls.i -quiet -dumpbase acls.c -O2 -version -o acls.s
Starting program: /usr/lib/gcc-lib/ppc-redhat-linux/3.0/cc1 -fpreprocessed 
acls.i -quiet -dumpbase acls.c -O2 -version -o acls.s
GNU CPP version 3.0 20010407 (prerelease) (cpplib) (PowerPC GNU/Linux)
GNU C version 3.0 20010407 (prerelease) (ppc-redhat-linux)
        compiled by GNU C version 3.0 20010407 (prerelease).
 
Program received signal SIGSEGV, Segmentation fault.
make_edge (edge_cache=0x0, src=0x10393018, dst=0x0, flags=0) at 
../../../gcc3/gcc/flow.c:1328
1328      e->pred_next = dst->pred;
(gdb) bt
#0  make_edge (edge_cache=0x0, src=0x10393018, dst=0x0, flags=0) at 
../../../gcc3/gcc/flow.c:1328
#1  0x101a5364 in make_label_edge (edge_cache=0x10394658, src=0x10394678, 
label=0x24, flags=64) at ../../../gcc3/gcc/flow.c:1360
#2  0x101a5054 in make_edges (label_value_list=0x0) at 
../../../gcc3/gcc/flow.c:1191
#3  0x101a3ce4 in find_basic_blocks (f=0x30077d00, nregs=272189048, 
file=0x24) at ../../../gcc3/gcc/flow.c:528
#4  0x1005c61c in rest_of_compilation (decl=0x30077d00) at 
../../../gcc3/gcc/toplev.c:3003
#5  0x1001bfb8 in c_expand_body (fndecl=0x30090618, nested_p=272189048) at 
../../../gcc3/gcc/c-decl.c:6743
#6  0x1001bc3c in finish_function (nested=271679940) at 
../../../gcc3/gcc/c-decl.c:6664
#7  0x10001f6c in yyparse_1 () at /usr/lib/bison.simple:324
#8  0x10006c10 in yyparse () at ../../../gcc3/gcc/c-lex.c:158
#9  0x1005b640 in compile_file (name=0x30090618 "0\t\005H0\t\b\210\036#`") at 
../../../gcc3/gcc/toplev.c:2392
#10 0x1005fb98 in main (argc=10, argv=0x4ac) at 
../../../gcc3/gcc/toplev.c:4962
#11 0x0fee1c6c in __libc_start_main (argc=2147481932, ubp_av=0x2, 
ubp_ev=0x24, auxvec=0x10320000, rtld_fini=0x10394658,
    stinfo=0xa, stack_on_entry=0x10320000) at 
../sysdeps/powerpc/elf/libc-start.c:119

This happens both in mainline and branch on powerpc-linux-gnu, the empty loop 
at the start of the testcase seems to be the problem.

Franz.



More information about the Gcc-bugs mailing list