[PATCH] D46459: [asan] Make GetCurrentThread RTEMS-friendly
Walter Lee via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 21 13:48:42 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL332888: [asan] Make GetCurrentThread RTEMS-friendly (authored by waltl, committed by ).
Herald added a subscriber: delcypher.
Changed prior to commit:
https://reviews.llvm.org/D46459?vs=147439&id=147862#toc
Repository:
rL LLVM
https://reviews.llvm.org/D46459
Files:
compiler-rt/trunk/lib/asan/asan_rtl.cc
compiler-rt/trunk/lib/asan/asan_thread.cc
Index: compiler-rt/trunk/lib/asan/asan_rtl.cc
===================================================================
--- compiler-rt/trunk/lib/asan/asan_rtl.cc
+++ compiler-rt/trunk/lib/asan/asan_rtl.cc
@@ -536,6 +536,9 @@
if (curr_thread) {
top = curr_thread->stack_top();
bottom = ((uptr)&local_stack - PageSize) & ~(PageSize - 1);
+ } else if (SANITIZER_RTEMS) {
+ // Give up On RTEMS.
+ return;
} else {
CHECK(!SANITIZER_FUCHSIA);
// If we haven't seen this thread, try asking the OS for stack bounds.
Index: compiler-rt/trunk/lib/asan/asan_thread.cc
===================================================================
--- compiler-rt/trunk/lib/asan/asan_thread.cc
+++ compiler-rt/trunk/lib/asan/asan_thread.cc
@@ -394,6 +394,9 @@
}
AsanThread *GetCurrentThread() {
+ if (SANITIZER_RTEMS && !asan_inited)
+ return nullptr;
+
AsanThreadContext *context =
reinterpret_cast<AsanThreadContext *>(AsanTSDGet());
if (!context) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46459.147862.patch
Type: text/x-patch
Size: 978 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180521/a6be3b5a/attachment-0001.bin>
More information about the llvm-commits
mailing list