[PATCH] D42897: MSan : Adding mmap W|X flag usage optional detection

Vitaly Buka via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 2 15:25:07 PST 2018


vitalybuka requested changes to this revision.
vitalybuka added a comment.
This revision now requires changes to proceed.

In https://reviews.llvm.org/D42897#1019861, @devnexen wrote:

> Refactor mmap interceptors.
>
> > refactor existing mmap interceptors and move them into the common


My point was to have the first patch which changes not functionality, but shuffle mmap code to make functionality changing patch simpler.
So no reference to WriteExec in the first patch.
And the second patch is likely sanitizer_common only change to add WriteExec reports.



================
Comment at: lib/sanitizer_common/sanitizer_allocator_secondary.h:20
 // sizes not covered by more efficient allocators (e.g. SizeClassAllocator64).
-template <class MapUnmapCallback = NoOpMapUnmapCallback,
-          class PtrArrayT = DefaultLargeMmapAllocatorPtrArray>
+template <class MapUnmapCallback = NoOpMapUnmapCallback>
 class LargeMmapAllocator {
----------------
Was this file change by mistake?
If not, please move lib/sanitizer_common/sanitizer_allocator_internal.* into separate patch with explanation in description of why you need to change this allocator


================
Comment at: lib/tsan/rtl/tsan_report.cc:491
 
+void ScopedReportMmapWriteExec() {
+  ctx->thread_registry->Lock();
----------------
Maybe ScopedReportMmapWriteExec -> ReportMmapWriteExec?
Nothing scoped here from callers perspective.

Also I can't see any callers.


https://reviews.llvm.org/D42897





More information about the llvm-commits mailing list