[LLVMbugs] [Bug 7601] New: x64 clang segfault
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Jul 8 20:11:42 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=7601
Summary: x64 clang segfault
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
Valgrind says it's a null-ptr deref.
[regehr at bethe tmp602]$ clang -v
clang version 2.8 (trunk 107853)
Target: x86_64-unknown-linux-gnu
Thread model: posix
[regehr at bethe tmp602]$ clang -O2 -c small.c
small.c:36:1: warning: type specifier missing, defaults to 'int'
[-Wimplicit-int]
int326 (struct S0 p_7, struct S3 p_8, int16_t p_9, int16_t p_10, uint8_t p_11)
^
small.c:38:12: warning: incompatible pointer types initializing 'int32_t *'
(aka 'int *') with an expression of type 'int16_t *' (aka 'short *')
int32_t *l_431 = &g_432;
^ ~~~~~~
0 clang 0x0000000001353a2f
1 clang 0x0000000001355ac2
2 libpthread.so.0 0x00007fdd45ac6190
3 clang 0x0000000000fecdc9
4 clang 0x0000000000fee266
5 clang 0x0000000000fee64f
6 clang 0x0000000000feeefe
7 clang 0x0000000000ff0015
8 clang 0x00000000012d6e9d
9 clang 0x00000000012d707b
10 clang 0x00000000012d736c
11 clang 0x000000000050a67e
12 clang 0x000000000050678b
13 clang 0x00000000006159cf
14 clang 0x00000000005076f4
15 clang 0x000000000042711d
16 clang 0x000000000040a02b
17 clang 0x0000000000410281 main + 3185
18 libc.so.6 0x00007fdd44db7abd __libc_start_main + 253
19 clang 0x0000000000407779
Stack dump:
0. Program arguments:
/uusoc/exports/scratch/regehr/z/compiler-install/llvm-gcc-r107853-install/bin/clang
-cc1 -triple x86_64-unknown-linux-gnu -S -disable-free -main-file-name small.c
-mrelocation-model static -mdisable-fp-elim -mconstructor-aliases
-munwind-tables -target-cpu x86-64 -resource-dir
/uusoc/exports/scratch/regehr/z/compiler-install/llvm-gcc-r107853-install/lib/clang/2.8
-O2 -ferror-limit 19 -fmessage-length 86 -fgnu-runtime
-fdiagnostics-show-option -fcolor-diagnostics -o /tmp/cc-y4sLYQ.s -x c small.c
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Simple Register Coalescing' on function '@int326'
clang: error: clang frontend command failed due to signal 11 (use -v to see
invocation)
[regehr at bethe tmp602]$ cat small.c
typedef short int int16_t;
typedef int int32_t;
typedef unsigned char uint8_t;
typedef unsigned int uint32_t;
typedef unsigned long int uint64_t;
static int16_t
safe_mod_func_int32_t_s_s (int32_t si1, int32_t si2)
{
return si2 == 0 || si1 && si2 == 1 ? si1 : (si1 % si2);
}
static uint64_t
safe_div_func_uint64_t_u_u (uint64_t ui1, uint64_t ui2)
{
return ui2 == 0 ? ui1 : (ui1 / ui2);
}
struct S0
{
uint32_t f0;
};
struct S2
{
const unsigned f1:1;
};
struct S3
{
};
int16_t g_51;
const int16_t *g_200 = &g_51;
const int16_t **volatile g_199 = &g_200;
struct S2 g_403[7] = {
};
int16_t g_432;
int326 (struct S0 p_7, struct S3 p_8, int16_t p_9, int16_t p_10, uint8_t p_11)
{
int32_t *l_431 = &g_432;
*l_431 =
p_7.f0 <=
safe_mod_func_int32_t_s_s (safe_div_func_uint64_t_u_u (**g_199, *l_431) |
+*l_431, *l_431) || g_403[2].f1;
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