http://llvm.org/bugs/show_bug.cgi?id=16277
Bug ID: 16277
Summary: -fsanitize=address doesn't obey aligned(256)
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
$ clang++ --version
clang version 3.4 (trunk 182481)
$ cat test.cc
#include "assert.h"
#include <stdint.h>
__attribute__((noinline)) void foo() {
char c = 0;
__attribute__((aligned(256))) unsigned char data[256];
assert(0 == (reinterpret_cast<uintptr_t>(data) & (256 - 1)));
}
__attribute__((noinline)) void bar() {
char c = 0;
foo();
}
int main() { bar(); }
$ clang++ test.cc -o test && ./test
$ clang++ test.cc -o test -fsanitize=address && ./test
test: test.cc:7: void foo(): Assertion `0 == (reinterpret_cast<uintptr_t>(data)
& (256 - 1))' failed.
Aborted (core dumped)
$
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs