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 driver/61206] New: Duplicate -I- causes compiler to hang


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61206

            Bug ID: 61206
           Summary: Duplicate -I- causes compiler to hang
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: driver
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tprince at coverity dot com

GCC hangs when (erroneously) given -I- and glibc reports a double free:

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/opt/pkg/gcc-4.9.0/libexec/gcc/i686-pc-linux-gnu/4.9.0/lto-wrapper
Target: i686-pc-linux-gnu
Configured with: ../configure --prefix=/opt/pkg/gcc-4.9.0
--program-suffix=-4.9.0 --enable-languages=c,c++
Thread model: posix
gcc version 4.9.0 (GCC) 
$ touch t.c
$ mkdir foo bar
$ gcc -c -I. -I- -Ifoo -I- -Ibar t.c
cc1: note: obsolete option -I- used, please use -iquote instead
cc1: error: -I- specified twice
*** glibc detected ***
/opt/pkg/gcc-4.9.0/libexec/gcc/i686-pc-linux-gnu/4.9.0/cc1: double free or
corruption (fasttop): 0x0a3e97a0 ***
======= Backtrace: =========
/lib/libc.so.6[0x6abb16]
/lib/libc.so.6(cfree+0x90)[0x6af030]
/opt/pkg/gcc-4.9.0/libexec/gcc/i686-pc-linux-gnu/4.9.0/cc1(_Z17split_quote_chainv+0x39)[0x836e359]
======= Memory map: ========
002a5000-002b0000 r-xp 00000000 fd:00 1902901   
/lib/libgcc_s-4.1.2-20080102.so.1
002b0000-002b1000 rwxp 0000a000 fd:00 1902901   
/lib/libgcc_s-4.1.2-20080102.so.1
00513000-00514000 r-xp 00513000 00:00 0          [vdso]
00625000-0063f000 r-xp 00000000 fd:00 1902893    /lib/ld-2.5.so
0063f000-00640000 r-xp 00019000 fd:00 1902893    /lib/ld-2.5.so
00640000-00641000 rwxp 0001a000 fd:00 1902893    /lib/ld-2.5.so
00643000-00780000 r-xp 00000000 fd:00 1902894    /lib/libc-2.5.so
00780000-00782000 r-xp 0013d000 fd:00 1902894    /lib/libc-2.5.so
00782000-00783000 rwxp 0013f000 fd:00 1902894    /lib/libc-2.5.so
00783000-00786000 rwxp 00783000 00:00 0 
00788000-0078a000 r-xp 00000000 fd:00 1902895    /lib/libdl-2.5.so
0078a000-0078b000 r-xp 00001000 fd:00 1902895    /lib/libdl-2.5.so
0078b000-0078c000 rwxp 00002000 fd:00 1902895    /lib/libdl-2.5.so
0078e000-007b3000 r-xp 00000000 fd:00 1902899    /lib/libm-2.5.so
007b3000-007b4000 r-xp 00024000 fd:00 1902899    /lib/libm-2.5.so
007b4000-007b5000 rwxp 00025000 fd:00 1902899    /lib/libm-2.5.so
08048000-09448000 r-xp 00000000 fd:00 5968643   
/opt/pkg/gcc-4.9.0/libexec/gcc/i686-pc-linux-gnu/4.9.0/cc1
09448000-09451000 rw-p 01400000 fd:00 5968643   
/opt/pkg/gcc-4.9.0/libexec/gcc/i686-pc-linux-gnu/4.9.0/cc1
09451000-09509000 rw-p 09451000 00:00 0 
0a3b8000-0a3fa000 rw-p 0a3b8000 00:00 0 
b7a00000-b7a21000 rw-p b7a00000 00:00 0 
b7a21000-b7b00000 ---p b7a21000 00:00 0 
b7b42000-b7d44000 rw-p b7b42000 00:00 0 
b7d44000-b7f44000 r--p 00000000 fd:00 9968315    /usr/lib/locale/locale-archive
b7f44000-b7f46000 rw-p b7f44000 00:00 0 
b7f51000-b7f52000 rw-p b7f51000 00:00 0 
bfb76000-bfb8b000 rw-p bfb76000 00:00 0          [stack]
(null):0: confused by earlier errors, bailing out

At which point the compiler hangs. I imagine this isn't worth fixing since it's
an invalid command line and -I- is deprecated, but I figured I'd report it in
case the relevant code is used elsewhere.


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