[LLVMbugs] [Bug 9133] New: clang emits crashing code at -O0
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Feb 3 12:03:09 PST 2011
http://llvm.org/bugs/show_bug.cgi?id=9133
Summary: clang emits crashing code at -O0
Product: new-bugs
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: regehr at cs.utah.edu
CC: llvmbugs at cs.uiuc.edu, chenyang at cs.utah.edu
I believe this was introduced fairly recently, probably in the last 5 days.
[regehr at gamow tmp002]$ clang -O0 small.c -o small
[regehr at gamow tmp002]$ ./small
Segmentation fault
[regehr at gamow tmp002]$ clang -v
clang version 2.9 (trunk 124809)
Target: x86_64-unknown-linux-gnu
Thread model: posix
[regehr at gamow tmp002]$ cat small.c
static int g_1 = 0;
static int g_2 = 0;
static int *g_3 = 0;
static int *foo(int p)
{
char l_1[7][2][4];
int *l_2[5];
int l_3;
return &g_2;
}
int main(int argc, char* argv[])
{
g_3 = foo(1);
g_1 = *g_3;
return 0;
}
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list