HomePhabricator

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

Authored by alekseyshl on Jun 13 2018, 10:18 AM.

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

llvm-svn: 334624