Skip to content

Commit 8f8250b

Browse files
thurstondgithub-actions[bot]
authored andcommitted
Automerge: [asan] Fix-forward undefined type in test from #153142 (#153636)
Fix Mac build breakage (reported by aeubanks in llvm/llvm-project#153142 (comment)) by including stdint.h and using uintptr_t
2 parents 67cb7df + 37cc010 commit 8f8250b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler-rt/test/asan/TestCases/Posix/fakestack_alignment.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
#include <assert.h>
2323
#include <pthread.h>
24+
#include <stdint.h>
2425
#include <stdio.h>
2526
#include <stdlib.h>
2627
#include <string.h>
@@ -35,7 +36,7 @@ bool misaligned = false;
3536
// happen by chance, so try this on many threads.
3637
void *Thread(void *unused) {
3738
big_object x;
38-
uint alignment = (unsigned long)&x % alignof(big_object);
39+
uintptr_t alignment = (uintptr_t)&x % alignof(big_object);
3940

4041
if (alignment != 0)
4142
misaligned = true;

0 commit comments

Comments
 (0)