[PATCH] D129385: [lsan][Darwin] Scan libdispatch and Foundation memory regions
Julian Lettner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 8 17:56:53 PDT 2022
yln added inline comments.
================
Comment at: compiler-rt/lib/lsan/lsan_common_mac.cpp:32
+static const int kSanitizerVmMemoryLibdispatch = VM_MEMORY_LIBDISPATCH;
static const int kSanitizerVmMemoryOsAllocOnce = VM_MEMORY_OS_ALLOC_ONCE;
#else
----------------
Can we get rid of this #ifdef here? I think we can drop support for compiling with SDK versions <= macOS 10.9 by now.
Maybe even inline the usage of the macros altogether?
================
Comment at: compiler-rt/lib/lsan/lsan_common_mac.cpp:41
+enum SeenRegion {
+ kNone = 0,
----------------
Slight preference to make this an enum class and drop the `k` prefix:
```
enum class RegionKind {
None = 0,
....
scan_state.seen_regions |= RegionKind::AllocOnce;
```
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129385/new/
https://reviews.llvm.org/D129385
More information about the llvm-commits
mailing list