[LLVMbugs] [Bug 14741] New: AddressSanitizer crash on inline assembly with RDTSC
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sat Dec 29 01:22:17 PST 2012
http://llvm.org/bugs/show_bug.cgi?id=14741
Bug #: 14741
Summary: AddressSanitizer crash on inline assembly with RDTSC
Product: compiler-rt
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: compiler-rt
AssignedTo: unassignedbugs at nondot.org
ReportedBy: dvyukov at google.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
$ cat /tmp/test.cc
#include <stdio.h>
typedef unsigned long long tick_t;
#define RDTICK() \
({ tick_t __t; __asm__ __volatile__ ("rdtsc" : "=A" (__t)); __t; })
tick_t read_cpu_ticks() {return RDTICK();}
int main() {
printf("%llu\n", read_cpu_ticks());
}
$ clang++ -v
clang version 3.3 (trunk 171216)
Target: x86_64-unknown-linux-gnu
Thread model: posix
$ clang++ /tmp/test.cc && ./a.out
16337390
$ clang++ /tmp/test.cc -fsanitize=address && ./a.out
ASAN:SIGSEGV
=================================================================
==411== ERROR: AddressSanitizer: SEGV on unknown address 0x000000047d83 (pc
0x000000418226 sp 0x7fffc5fed520 bp 0x7fffc5fed5d0 T0)
AddressSanitizer can not provide additional info.
#0 0x418225
(/usr/local/google/home/dvyukov/src/fc/fc_benchmark_15_6_2010/a.out+0x418225)
#1 0x41826c
(/usr/local/google/home/dvyukov/src/fc/fc_benchmark_15_6_2010/a.out+0x41826c)
#2 0x7fe48ddf476c (/lib/x86_64-linux-gnu/libc-2.15.so+0x2176c)
Stats: 0M malloced (0M for red zones) by 0 calls
Stats: 0M realloced by 0 calls
Stats: 0M freed by 0 calls
Stats: 0M really freed by 0 calls
Stats: 0M (0M-0M) mmaped; 0 maps, 0 unmaps
mmaps by size class:
mallocs by size class:
frees by size class:
rfrees by size class:
Stats: malloc large: 0 small slow: 0
Stats: StackDepot: 0 ids; 0M mapped
==411== ABORTING
--
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