summaryrefslogtreecommitdiff
path: root/test/scudo/alignment.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/scudo/alignment.cpp')
-rw-r--r--test/scudo/alignment.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/test/scudo/alignment.cpp b/test/scudo/alignment.cpp
index c5e57d179..a6eca87a8 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;
}