[compiler-rt] Add aligned_alloc to macOS tsan interceptors (PR #79198)

Chris Apple via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 23 12:00:36 PST 2024


================
@@ -0,0 +1,62 @@
+// RUN: %clang_tsan -O1 %s -o %t -undefined dynamic_lookup
+// RUN: %deflake %run %t | FileCheck %s 
+
+#include "test.h"
+
+#include <stdlib.h>
+
+#if defined(__cplusplus) && (__cplusplus >= 201703L)
----------------
cjappl wrote:

Originally, I wanted to use the pattern found here:

https://github.com/llvm/llvm-project/blob/f7669ba3d9443bc95dd63fa25beea13e6265fdc5/compiler-rt/test/tsan/libdispatch/async_and_wait.c#L8-L21

But I could not get this to compile without "aligned_alloc" is not available on your system errors. Is this implementation OK? Or can someone help me troubleshoot why I was having issues?

https://github.com/llvm/llvm-project/pull/79198


More information about the llvm-commits mailing list