[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:28:17 PDT 2016


eugenis added inline comments.

================
Comment at: lib/esan/CMakeLists.txt:21
@@ +20,3 @@
+  # Assume Linux
+  list(APPEND ESAN_SOURCES
+    esan_linux.cpp)
----------------
eugenis wrote:
> bruening wrote:
> > bruening wrote:
> > > 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?
> > Or are you suggesting to not say "assume linux" here, and have the source file say "#if SANITIZER_LINUX" if it really won't work on BSD (should prob be _posix if it works on BSD)?
> Hm, I don't see why this cmake change would be necessary if the C++ source had the proper guards. The TSan thing could be legacy.
> 
I'm saying that you should not need this cmake logic at all.

Regarding BSD code, I think it is generally in *_linux files, because they are so similar.


http://reviews.llvm.org/D20745





More information about the llvm-commits mailing list