[compiler-rt] [asan] Implement interception on AIX (PR #131870)

Hubert Tong via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 10 22:03:43 PST 2025


================
@@ -282,7 +292,12 @@ INTERCEPTOR(int, pthread_create, void *thread, void *attr,
 #    endif
     asanThreadArgRetval().Create(detached, {start_routine, arg}, [&]() -> uptr {
       result = REAL(pthread_create)(thread, attr, asan_thread_start, t);
+// AIX pthread_t is unsigned int.
+#    if SANITIZER_AIX
+      return result ? 0 : *(unsigned*)(thread);
----------------
hubert-reinterpretcast wrote:

Nit: Match style with similar line below.
```suggestion
      return result ? 0 : *(unsigned *)(thread);
```

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


More information about the llvm-commits mailing list