[PATCH] D56111: [asan] Fix build on windows.
Evgenii Stepanov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 27 14:21:02 PST 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL350104: [asan] Fix build on windows. (authored by eugenis, committed by ).
Herald added a subscriber: delcypher.
Changed prior to commit:
https://reviews.llvm.org/D56111?vs=179580&id=179581#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56111/new/
https://reviews.llvm.org/D56111
Files:
compiler-rt/trunk/lib/asan/asan_thread.cc
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
@@ -285,13 +285,21 @@
return main_thread;
}
+static bool StackLimitsAreAvailable() {
+#if SANITIZER_WINDOWS
+ return true;
+#else
+ return MemoryMappingLayout::IsAvailable();
+#endif
+}
+
// This implementation doesn't use the argument, which is just passed down
// from the caller of Init (which see, above). It's only there to support
// OS-specific implementations that need more information passed through.
void AsanThread::SetThreadStackAndTls(const InitOptions *options) {
DCHECK_EQ(options, nullptr);
// If this process is "init" (pid 1), /proc may not be mounted yet.
- if (!start_routine_ && !MemoryMappingLayout::IsAvailable()) {
+ if (!start_routine_ && !StackLimitsAreAvailable()) {
stack_top_ = stack_bottom_ = 0;
tls_begin_ = tls_end_ = 0;
} else {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56111.179581.patch
Type: text/x-patch
Size: 1006 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181227/73e35763/attachment.bin>
More information about the llvm-commits
mailing list