[PATCH] D20745: [esan] Add handling of large stack size rlimits

Derek Bruening via llvm-commits llvm-commits at lists.llvm.org
Fri May 27 13:18:28 PDT 2016


bruening added inline comments.

================
Comment at: lib/esan/CMakeLists.txt:21
@@ +20,3 @@
+  # Assume Linux
+  list(APPEND ESAN_SOURCES
+    esan_linux.cpp)
----------------
eugenis wrote:
> You append esan_linux.cpp to the list, but it's already in it.
> Also, we usually do it in the source like this:
> #include "sanitizer_common/sanitizer_platform.h"
> #if SANITIZER_FREEBSD || SANITIZER_LINUX
> 
> 
> 
This is cmake, though.  This is following how tsan adds tsan_platform_linux.cc (well tsan doesn't leave the file in the main list too ;)).  Is there a cmake variable set in a parent file distinguishing Linux from BSD?

================
Comment at: lib/esan/esan_linux.cpp:47
@@ +46,3 @@
+
+bool fixMmapAddr(void **Addr, SIZE_T Size, int Flags) {
+  if (*Addr) {
----------------
eugenis wrote:
> MSan handles this by mprotect-ing all regions that don't have a shadow mapping, and then the kernel takes care of the rest. Is it hard to do here because of the variable shadow scale?
I don't see how that stops a MAP_FIXED mmap?


http://reviews.llvm.org/D20745





More information about the llvm-commits mailing list