[PATCH] D11767: [tsan] Fix aarch64 build issue

Adhemerval Zanella adhemerval.zanella at linaro.org
Wed Aug 5 10:26:33 PDT 2015


zatrazz created this revision.
zatrazz added reviewers: rengolin, kcc, eugenis, dvyukov.
zatrazz added a subscriber: llvm-commits.
Herald added subscribers: rengolin, aemerson.

This patch fixes tsan broke build for aarch64 since GLIBC 2.20+, sys/user.h
does not include asm/ptrace.h (which defined struct user_pt_regs).  This patch
fixes by including it instead of sys/user.h.

http://reviews.llvm.org/D11767

Files:
  lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc

Index: lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
===================================================================
--- lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
+++ lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
@@ -33,6 +33,10 @@
 #if SANITIZER_ANDROID && defined(__arm__)
 # include <linux/user.h>  // for pt_regs
 #else
+# ifdef __aarch64__
+// GLIBC 2.20+ sys/user does not include asm/ptrace.h
+#  include <asm/ptrace.h>
+# endif
 # include <sys/user.h>  // for user_regs_struct
 #endif
 #include <sys/wait.h> // for signal-related stuff


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11767.31367.patch
Type: text/x-patch
Size: 597 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150805/4eadb2c6/attachment.bin>


More information about the llvm-commits mailing list