From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9061 invoked by alias); 28 Oct 2003 07:28:44 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 9052 invoked by uid 48); 28 Oct 2003 07:28:42 -0000 Date: Tue, 28 Oct 2003 08:01:00 -0000 From: "aj at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org Message-ID: <20031028072834.12804.aj@gcc.gnu.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug bootstrap/12804] New: zone allocator is broken X-Bugzilla-Reason: CC X-SW-Source: 2003-10/txt/msg02470.txt.bz2 List-Id: PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12804 Summary: zone allocator is broken Product: gcc Version: 3.4 Status: UNCONFIRMED Severity: normal Priority: P2 Component: bootstrap AssignedTo: dberlin at dberlin dot org ReportedBy: aj at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: x86_64-linux-gnu GCC host triplet: x86_64-linux-gnu GCC target triplet: x86_64-linux-gnu See also the discussion starting at: http://gcc.gnu.org/ml/gcc-patches/2003-10/msg02401.html I tried to bootstrap on x86_64-linux-gnu using --with-gc=zone and full checking (including GCAC) and get this ICE: ./xgcc -B./ -B/opt/gcc/3.4-devel/x86_64-suse-linux-gnu/bin/ -isystem /opt/gcc/3.4-devel/x86_64-suse-linux-gnu/include -isystem /opt/gcc/3.4-devel/x86_64-suse-linux-gnu/sys-include -L/abuild/aj/builds/gcc/misc/gcc/../ld -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include -I. -I. -I/usr/src/aj/cvs/gcc/gcc -I/usr/src/aj/cvs/gcc/gcc/. -I/usr/src/aj/cvs/gcc/gcc/../include -g0 -finhibit-size-directive -fno-inline-functions -fno-exceptions -fno-zero-initialized-in-bss -fno-unit-at-a-time -fno-omit-frame-pointer -fno-asynchronous-unwind-tables \ -c /usr/src/aj/cvs/gcc/gcc/crtstuff.c -DCRT_END \ -o crtend.o In file included from /usr/src/aj/cvs/gcc/gcc/tsystem.h:89, from /usr/src/aj/cvs/gcc/gcc/crtstuff.c:62: /usr/include/stdlib.h:394: internal compiler error: in sweep_pages, at ggc-zone.c:1333 Please submit a full bug report, with preprocessed source if appropriate. See for instructions. make: *** [crtend.o] Error 1 Running gdb gives some more insight: (gdb) r -fpreprocessed crtstuff.i -quiet -dumpbase crtstuff.c -mtune=k8 -auxbase-strip crtend.o -g0 -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -version -finhibit-size-directive -fno-inline-functions -fno-exceptions -fno-zero-initialized-in-bss -fno-unit-at-a-time -fno-omit-frame-pointer -fno-asynchronous-unwind-tables -o crtstuff.s Starting program: /abuild/aj/builds/gcc/misc/gcc/cc1 -fpreprocessed crtstuff.i -quiet -dumpbase crtstuff.c -mtune=k8 -auxbase-strip crtend.o -g0 -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -version -finhibit-size-directive -fno-inline-functions -fno-exceptions -fno-zero-initialized-in-bss -fno-unit-at-a-time -fno-omit-frame-pointer -fno-asynchronous-unwind-tables -o crtstuff.s Breakpoint 2 at 0x2a9569fc30 Breakpoint 3 at 0x2a9569ed00 GNU C version 3.4 20031027 (experimental) (x86_64-suse-linux-gnu) compiled by GNU C version 3.3.1 (SuSE Linux). GGC heuristics: --param ggc-min-expand=0 --param ggc-min-heapsize=0 Breakpoint 1, fancy_abort (file=0xf98440 "/usr/src/aj/cvs/gcc/gcc/ggc-zone.c", line=1333, function=0xf984c1 "sweep_pages") at /usr/src/aj/cvs/gcc/gcc/diagnostic.c:584 584 internal_error ("in %s, at %s:%d", function, trim_filename (file), line); (gdb) bt #0 fancy_abort (file=0xf98440 "/usr/src/aj/cvs/gcc/gcc/ggc-zone.c", line=1333, function=0xf984c1 "sweep_pages") at /usr/src/aj/cvs/gcc/gcc/diagnostic.c:584 #1 0x0000000000c8bfd8 in sweep_pages (zone=0x11895a0) at /usr/src/aj/cvs/gcc/gcc/ggc-zone.c:1333 #2 0x0000000000c8c2a0 in ggc_collect_1 (zone=0x11895a0, need_marking=true) at /usr/src/aj/cvs/gcc/gcc/ggc-zone.c:1401 #3 0x0000000000c8c3f9 in ggc_collect () at /usr/src/aj/cvs/gcc/gcc/ggc-zone.c:1472 #4 0x00000000004029f6 in yyparse () at c-parse.y:295 #5 0x000000000040d94c in c_parse_file () at c-parse.y:2834 #6 0x000000000047f827 in c_common_parse_file (set_yydebug=0) at /usr/src/aj/cvs/gcc/gcc/c-opts.c:1226 #7 0x0000000000c3599a in compile_file () at /usr/src/aj/cvs/gcc/gcc/toplev.c:1836 #8 0x0000000000c3abb7 in do_compile () at /usr/src/aj/cvs/gcc/gcc/toplev.c:4689 #9 0x0000000000c3ac4f in toplev_main (argc=26, argv=0x7fbfffeec8) at /usr/src/aj/cvs/gcc/gcc/toplev.c:4729 #10 0x00000000004a76cb in main (argc=26, argv=0x7fbfffeec8) at /usr/src/aj/cvs/gcc/gcc/main.c:35 (gdb) up #1 0x0000000000c8bfd8 in sweep_pages (zone=0x11895a0) at /usr/src/aj/cvs/gcc/gcc/ggc-zone.c:1333 1333 abort (); (gdb) p p $1 = (page_entry *) 0x123c130 (gdb) p *p $2 = {next = 0x123c0f0, bytes = 4096, survived = 2, page = 0x2a95a2e000 "", bytes_free = 6990, context_depth = 0, large_p = false, zone = 0x11895a0} To reproduce on my x86-64 system: - start with an empty directory - configure with: $ /usr/src/aj/cvs/gcc/configure --prefix=/opt/gcc/3.4-devel --disable-nls --enable-threads=posix --enable-clocale=gnu --enable-__cxa_atexit --enable-shared --enable-languages=c,c++,ada,treelang,java,f77,objc --enable-checking=misc,tree,rtl,gc,rtlflag,gcac --with-gc=zone --with-system-zlib x86_64-suse-linux-gnu - make bootstrap