[PATCH] D105629: [TSan] Add SystemZ support

Ilya Leoshkevich via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 12 04:02:22 PDT 2021


iii marked an inline comment as done.
iii added inline comments.


================
Comment at: compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:781
+      // TSAN. Act as if we ran out of memory.
+      internal_munmap(res, sz);
+      errno = errno_ENOMEM;
----------------
dvyukov wrote:
> TSan runtime is supposed to mprotect all ranges that are inaccessible to the application. How does it happen that kernel still returns such an address? Do we fail to mprotect all ranges on s390? If so should that be fixed instead?
> I am concerned that if kernel can return unsupported addresses, it probably can returns them very early before exhausting all supported addresses (e.g. always return unsupported from the start).
> Or is it that we mprotect everything, but kernel still somehow stomps on it? If so can this address overlap with, say, tsan shadow? If yes, them the munmap will unmap our shadow which is not good.
The common code in CheckAndProtect() didn't mprotect the address space "tail" - I've added a special case for that.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D105629/new/

https://reviews.llvm.org/D105629



More information about the cfe-commits mailing list