HomePhabricator

[TSan] Fix madvise(MADV_NOHUGEPAGE) for meta shadow memory

Description

[TSan] Fix madvise(MADV_NOHUGEPAGE) for meta shadow memory

Summary:
Move madvise(MADV_NOHUGEPAGE) for the meta shadow memory after the meta
shadow memory is mapped (currently it silently fails with ENOMEM).

Add a diagnostic message to detect similar problems in the future.

Reviewers: dvyukov

Subscribers: kubamracek, delcypher, #sanitizers, llvm-commits

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