[compiler-rt] 85c0b34 - [GWP-ASan] Fix thread ID.

Mitch Phillips via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 5 10:28:21 PST 2020


Author: Mitch Phillips
Date: 2020-03-05T10:28:09-08:00
New Revision: 85c0b34fc5a5e19dee4b5055eaafbb1c2589c233

URL: https://github.com/llvm/llvm-project/commit/85c0b34fc5a5e19dee4b5055eaafbb1c2589c233
DIFF: https://github.com/llvm/llvm-project/commit/85c0b34fc5a5e19dee4b5055eaafbb1c2589c233.diff

LOG: [GWP-ASan] Fix thread ID.

Summary:
GWP-ASan currently reports <unknown> thread ID, as the crash handler
merge dropped the include. Oops.

Reviewers: morehouse

Reviewed By: morehouse

Subscribers: eugenis, #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

Differential Revision: https://reviews.llvm.org/D75693

Added: 
    

Modified: 
    compiler-rt/lib/gwp_asan/platform_specific/common_posix.cpp
    compiler-rt/lib/gwp_asan/platform_specific/guarded_pool_allocator_posix.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/gwp_asan/platform_specific/common_posix.cpp b/compiler-rt/lib/gwp_asan/platform_specific/common_posix.cpp
index 38e6ce0c940b..e44e6299eeac 100644
--- a/compiler-rt/lib/gwp_asan/platform_specific/common_posix.cpp
+++ b/compiler-rt/lib/gwp_asan/platform_specific/common_posix.cpp
@@ -8,6 +8,9 @@
 
 #include "gwp_asan/common.h"
 
+#include <sys/syscall.h>
+#include <unistd.h>
+
 namespace gwp_asan {
 
 uint64_t getThreadID() {

diff  --git a/compiler-rt/lib/gwp_asan/platform_specific/guarded_pool_allocator_posix.cpp b/compiler-rt/lib/gwp_asan/platform_specific/guarded_pool_allocator_posix.cpp
index bef4ef547417..a8767a4cb808 100644
--- a/compiler-rt/lib/gwp_asan/platform_specific/guarded_pool_allocator_posix.cpp
+++ b/compiler-rt/lib/gwp_asan/platform_specific/guarded_pool_allocator_posix.cpp
@@ -15,7 +15,6 @@
 #include <stdlib.h>
 #include <string.h>
 #include <sys/mman.h>
-#include <sys/syscall.h>
 #include <sys/types.h>
 #include <unistd.h>
 


        


More information about the llvm-commits mailing list