llvm-project/compiler-rt/lib/cfi
Evgeniy Stepanov 443c034391 [sanitizer] Decorate /proc/self/maps better.
Summary:
Refactor the way /proc/self/maps entries are annotated to support most
(all?) posix platforms, with a special implementation for Android.
Extend the set of decorated Mmap* calls.

Replace shm_open with internal_open("/dev/shm/%s"). Shm_open is
problematic because it calls libc open() which may be intercepted.

Generic implementation has limits (max number of files under /dev/shm is
64K on my machine), which can be conceivably reached when sanitizing
multiple programs at once. Android implemenation is essentially free, and
enabled by default.

The test in sanitizer_common is copied to hwasan and not reused directly
because hwasan fails way too many common tests at the moment.

Reviewers: pcc, vitalybuka

Subscribers: srhines, kubamracek, jfb, llvm-commits, kcc

Differential Revision: https://reviews.llvm.org/D57720

llvm-svn: 353255
2019-02-06 01:14:50 +00:00
..
CMakeLists.txt [Cfi] Compiling cfi library on FreeBSD and NetBSD 2018-10-01 18:01:55 +00:00
cfi.cc [sanitizer] Decorate /proc/self/maps better. 2019-02-06 01:14:50 +00:00
cfi_blacklist.txt cfi: Remove blacklist entries for libc++. 2018-08-15 18:05:55 +00:00