Restrict usage of MemoryMappingLayout to platforms which support it
@@ -59,6 +59,7 @@ static void MaybeDumpRegisters(void *context) {
}
static void MaybeReportNonExecRegion(uptr pc) {
+#if SANITIZER_FREEBSD || SANITIZER_LINUX
MemoryMappingLayout proc_maps(/*cache_enabled*/ true);
uptr start, end, protection;
while (proc_maps.Next(&start, &end, nullptr, nullptr, 0, &protection)) {
@@ -66,6 +67,7 @@ static void MaybeReportNonExecRegion(uptr pc) {
!(protection & MemoryMappingLayout::kProtectionExecute))
Report("Hint: PC is at a non-executable region. Maybe a wild jump?\n");
}
+#endif
}
void ErrorDeadlySignal::Print() {
