This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/53163] New: crash due to null ptr deref
- From: "regehr at cs dot utah.edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 30 Apr 2012 05:08:59 +0000
- Subject: [Bug c/53163] New: crash due to null ptr deref
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53163
Bug #: 53163
Summary: crash due to null ptr deref
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: regehr@cs.utah.edu
CC: chenyang@cs.utah.edu
[regehr@dyson r43]$ current-gcc -c -O3 small.c
small.c: In function 'fn2':
small.c:22:1: internal compiler error: Segmentation fault
fn2 ()
^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
[regehr@dyson r43]$ cat small.c
struct
{
int f0;
} b, f;
int a, c;
void
fn1 ()
{
int d, e;
d = 4;
for (; d < 19; ++d)
{
e = 2;
for (; e >= 0; e--)
{
a = 0;
a = 1;
}
}
}
void
fn2 ()
{
int g, h, i;
i = 1;
for (; i >= 0; i--)
{
b = f;
g = 0;
for (; g <= 1; g++)
{
if (c)
break;
h = 0;
for (; h <= 1; h++)
fn1 ();
fn1 ();
}
}
}
[regehr@dyson r43]$ current-gcc -v
Using built-in specs.
COLLECT_GCC=current-gcc
COLLECT_LTO_WRAPPER=/uusoc/exports/scratch/regehr/z/compiler-install/gcc-r186946-install/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.8.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../configure --with-libelf=/usr/local --enable-lto
--prefix=/home/regehr/z/compiler-install/gcc-r186946-install
--program-prefix=r186946- --enable-languages=c,c++
Thread model: posix
gcc version 4.8.0 20120429 (experimental) (GCC)