[PATCH] D44579: [asan] Clean up some confusing code in `test/asan/TestCases/Darwin/segv_read_write.c`

Dan Liew via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 12 09:49:22 PDT 2018


delcypher added a comment.

In https://reviews.llvm.org/D44579#1160273, @kubamracek wrote:

> Actually, it's even simpler that that. The access is always valid (from the shadow's perspective). We're just trapping on a regular SEGV and the signal handler gets the information whether this is a read or a write.


Yes that's what I observed. Presumably we don't update the shadow for `mmap()` and `munmap()` calls because the OS will handle bad accesses for us by trapping?


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D44579





More information about the llvm-commits mailing list