diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-01-02 19:18:27 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-01-02 19:18:27 +0000 |
commit | 316d58822dada9440bd06ecfc758dcc2364d617c (patch) | |
tree | fe72ec2e6ce9a360dda74d9d57f7acdb0e3c39d6 /test/scudo/alignment.cpp | |
parent | 0230fcf22fe7d19f03d981c9c2c59a3db0b72ea5 (diff) |
Notes
Diffstat (limited to 'test/scudo/alignment.cpp')
-rw-r--r-- | test/scudo/alignment.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/test/scudo/alignment.cpp b/test/scudo/alignment.cpp index c5e57d179907..a6eca87a8224 100644 --- a/test/scudo/alignment.cpp +++ b/test/scudo/alignment.cpp @@ -1,11 +1,10 @@ // RUN: %clang_scudo %s -o %t // RUN: not %run %t pointers 2>&1 | FileCheck %s -// Tests that a non-16-byte aligned pointer will trigger the associated error -// on deallocation. +// Tests that a non MinAlignment aligned pointer will trigger the associated +// error on deallocation. #include <assert.h> -#include <malloc.h> #include <stdint.h> #include <stdlib.h> #include <string.h> @@ -17,7 +16,7 @@ int main(int argc, char **argv) void *p = malloc(1U << 16); if (!p) return 1; - free(reinterpret_cast<void *>(reinterpret_cast<uintptr_t>(p) | 8)); + free(reinterpret_cast<void *>(reinterpret_cast<uintptr_t>(p) | 1)); } return 0; } |