[LLVMbugs] [Bug 16277] New: -fsanitize=address doesn't obey aligned(256)

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Jun 7 19:28:53 PDT 2013


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: unassignedclangbugs at nondot.org
          Reporter: jyasskin at google.com
                CC: llvmbugs at cs.uiuc.edu
    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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130608/45af7387/attachment.html>


More information about the llvm-bugs mailing list