Reproducable SIGSEGV (char ************* etc.)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gcc |
Won't Fix
|
Low
|
|||
gcc-4.1 (Ubuntu) |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: gcc-4.1
When you declare a variable which uses the *-operator a _lot_ of times, this causes gcc (the cc1 binary) to segfault. This problem may actually be exploitable.
Example: char *******
An example source code is available at: http://
Example session:
gst@pico:~$ gdb -q /usr/lib/
(no debugging symbols found)
Using host libthread_db library "/lib/tls/
(gdb) r foo.c
Starting program: /usr/lib/
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
main
Program received signal SIGSEGV, Segmentation fault.
0x084542bc in ?? ()
Changed in gcc: | |
status: | Unknown → Won't Fix |
Changed in gcc: | |
importance: | Unknown → Low |
$ perl -wle 'print "int", "*" x 999999, "p;"' >try.c && gcc try.c
gcc: Internal error: Segmentation fault (program cc1)
...
$ gcc -v portage/ sys-devel/ gcc-4.1. 1-r3/work/ gcc-4.1. 1/configure --prefix=/usr --bindir= /usr/i686- pc-linux- gnu/gcc- bin/4.1. 1 --includedir= /usr/lib/ gcc/i686- pc-linux- gnu/4.1. 1/include --datadir= /usr/share/ gcc-data/ i686-pc- linux-gnu/ 4.1.1 --mandir= /usr/share/ gcc-data/ i686-pc- linux-gnu/ 4.1.1/man --infodir= /usr/share/ gcc-data/ i686-pc- linux-gnu/ 4.1.1/info --with- gxx-include- dir=/usr/ lib/gcc/ i686-pc- linux-gnu/ 4.1.1/include/ g++-v4 --host= i686-pc- linux-gnu --build= i686-pc- linux-gnu --disable-altivec --enable-nls --without- included- gettext --with-system-zlib --disable-checking --disable-werror --enable-secureplt --disable- libunwind- exceptions --disable-multilib --disable- libmudflap --disable-libssp --enable- java-awt= gtk --enable- languages= c,c++,java, fortran --enable-shared --enable- threads= posix --enable- __cxa_atexit --enable- clocale= gnu
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: /var/tmp/
Thread model: posix
gcc version 4.1.1 (Gentoo 4.1.1-r3)
gcc-4.3-20070427 seems to have the same problem.
3.4.6 works fine, but after increasing the number of *'s to 99999999 it says:
cc1: out of memory allocating 1677721600 bytes after a total of 845819904 bytes
So this problem seems to be new in gcc4.