[LLVMbugs] [Bug 971] NEW: boostrap build fails with all optzns removed

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sat Oct 28 08:51:25 PDT 2006


http://llvm.org/bugs/show_bug.cgi?id=971

           Summary: boostrap build fails with all optzns removed
           Product: tools
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: llvm-gcc
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: nicholas at mxc.ca


I changed llvm-backend.cpp to exclude the PerModulePasses no matter what the
optimization level was. Specifically, I added #if 0 right after "if (optimize >
0) {" and the matching #endif right before the matching "}".

"make bootstrap" fails with the following error:

./xgcc -B./ -B/home/nicholas/llvm-gcc/install/i686-pc-linux-gnu/bin/ -isystem
/home/nicholas/llvm-gcc/install/i686-pc-linux-gnu/include -isystem
/home/nicholas/llvm-gcc/install/i686-pc-linux-gnu/sys-include
-L/home/nicholas/llvm-gcc/build/gcc/../ld -O2  -DIN_GCC    -W -Wall
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition
 -isystem ./include  -fPIC -g  -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  -I. -I.
-I../../src/gcc -I../../src/gcc/. -I../../src/gcc/../include
-I../../src/gcc/../libcpp/include  -I/home/nicholas/llvm/include
-I/home/nicholas/llvm/include -DL_muldi3 -c ../../src/gcc/libgcc2.c -o
libgcc/./_muldi3.o
In file included from /usr/include/stdio.h:36,
                 from ../../src/gcc/tsystem.h:90,
                 from ../../src/gcc/libgcc2.c:41:
/usr/include/bits/types.h:146: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://llvm.org/bugs> for instructions.

At the moment, gdb isn't playing along, but valgrind does show something
interesting:

$ valgrind --db-attach=yes ./cc1 -quiet -I. -I. -I../../src/gcc
-I../../src/gcc/. -I../../src/gcc/../include -I../../src/gcc/../libcpp/include
-I/home/nicholas/llvm/include -I/home/nicholas/llvm/include -iprefix
/home/nicholas/llvm-gcc/build/gcc/../lib/gcc/i686-pc-linux-gnu/4.0.1/ -isystem
./include -DIN_GCC -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -DL_muldi3 -isystem
/home/nicholas/llvm-gcc/install/i686-pc-linux-gnu/include -isystem
/home/nicholas/llvm-gcc/install/i686-pc-linux-gnu/sys-include -isystem ./include
../../src/gcc/libgcc2.c -quiet -dumpbase libgcc2.c -mtune=generic -auxbase-strip
libgcc/./_muldi3.o -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-prototypes -Wold-style-definition -fPIC -o /tmp/ccJ3kfje.s
==17508== Memcheck, a memory error detector.
==17508== Copyright (C) 2002-2006, and GNU GPL'd, by Julian Seward et al.
==17508== Using LibVEX rev 1658, a library for dynamic binary translation.
==17508== Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP.
==17508== Using valgrind-3.2.1-Debian, a dynamic binary instrumentation framework.
==17508== Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et al.
==17508== For more details, rerun with: -v
==17508== 
==17508== Invalid read of size 4
==17508==    at 0x8059AD5: (within /home/nicholas/llvm-gcc/build/gcc/cc1)
==17508==  Address 0x171 is not stack'd, malloc'd or (recently) free'd
==17508== 
==17508== ---- Attach to debugger ? --- [Return/N/n/Y/y/C/c] ---- y
starting debugger
==17508== starting debugger with cmd: /usr/bin/gdb -nw /proc/17509/fd/1014 17509
GNU gdb 6.4.90-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...Using host libthread_db library
"/usr/lib/debug/libthread_db.so.1".

Attaching to program: /proc/17509/fd/1014, process 17509
Reading symbols from /usr/lib/valgrind/x86-linux/vgpreload_core.so...done.
[...]
Loaded symbols for /usr/lib/debug/libdl.so.2

warning: Lowest section in system-supplied DSO at 0xffffe000 is .hash at ffffe0b4
0x08059ad5 in .BB16_56 ()
Breakpoint 1 at 0x81d1220
Breakpoint 2 at 0x81d1440
Breakpoint 3 at 0x5e3ff96: file exit.c, line 35.
Breakpoint 4 at 0x5e3ec15: file ../sysdeps/generic/abort.c, line 50.
(gdb) bt
#0  0x08059ad5 in .BB16_56 ()
#1  0x05f635c0 in ?? ()
#2  0x0623ad50 in ?? ()
#3  0x00000111 in ?? ()
Previous frame inner to this frame (corrupt stack?)
(gdb) 

No useful backtrace, no line numbers. "cc1" doesn't have any debugging
information. I've tried, but I can't seem to compile llvm-gcc with debugging.



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.



More information about the llvm-bugs mailing list