[all-commits] [llvm/llvm-project] 82a615: [asan] Don't double poison secondary allocations
Vitaly Buka via All-commits
all-commits at lists.llvm.org
Thu Jun 22 12:35:43 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 82a61523443ccfeb4302556f58b0427afb7c474f
https://github.com/llvm/llvm-project/commit/82a61523443ccfeb4302556f58b0427afb7c474f
Author: Vitaly Buka <vitalybuka at google.com>
Date: 2023-06-22 (Thu, 22 Jun 2023)
Changed paths:
M compiler-rt/lib/asan/asan_allocator.cpp
M compiler-rt/test/sanitizer_common/TestCases/Posix/huge_malloc.c
Log Message:
-----------
[asan] Don't double poison secondary allocations
Sanitizers allocate shadow and memory as MAP_NORESERVE.
User memory can stay this way and do not increase RSS as long as we
don't store there.
The shadow unpoisoning also can avoid RSS increase for zeroed pages.
However as soon we poison the shadow, we need the page in RSS.
To avoid unnececary RSS increase we should not poison memory just before
unpoisoning them.
Depends on D153497.
Reviewed By: thurston
Differential Revision: https://reviews.llvm.org/D153500
More information about the All-commits
mailing list