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

Evgeniy Stepanov via llvm-commits llvm-commits at lists.llvm.org
Fri May 27 13:08:00 PDT 2016

eugenis added inline comments.

Comment at: lib/esan/CMakeLists.txt:21
@@ +20,3 @@
+  # Assume Linux
+    esan_linux.cpp)
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"

Comment at: lib/esan/esan_linux.cpp:47
@@ +46,3 @@
+bool fixMmapAddr(void **Addr, SIZE_T Size, int Flags) {
+  if (*Addr) {
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?

Comment at: lib/esan/esan_shadow.h:44
@@ +43,3 @@
+// Our regions assume that the stack rlimit is less than a terabyte (otherwise
+// the Linx kernel's default mmap region drops below 0x7e00'), which we enforce
+// at init time (we can support larger and unlimited sizes for shadow
typo: Linux


More information about the llvm-commits mailing list