esan: fix shadow setup
r337531 changed return type of MmapFixedNoReserve, but esan wasn't updated. As the result esan shadow setup always fails. We probably need to make MmapFixedNoAccess signature consistent with MmapFixedNoReserve. But this is just to unbreak tests. llvm-svn: 337550
This commit is contained in:
parent
0f609db61a
commit
97cf5f7f40
@ -163,15 +163,15 @@ static void initializeShadow() {
|
||||
VPrintf(1, "Shadow #%d: [%zx-%zx) (%zuGB)\n", i, ShadowStart, ShadowEnd,
|
||||
(ShadowEnd - ShadowStart) >> 30);
|
||||
|
||||
uptr Map;
|
||||
uptr Map = 0;
|
||||
if (__esan_which_tool == ESAN_WorkingSet) {
|
||||
// We want to identify all shadow pages that are touched so we start
|
||||
// out inaccessible.
|
||||
Map = (uptr)MmapFixedNoAccess(ShadowStart, ShadowEnd- ShadowStart,
|
||||
"shadow");
|
||||
} else {
|
||||
Map = (uptr)MmapFixedNoReserve(ShadowStart, ShadowEnd - ShadowStart,
|
||||
"shadow");
|
||||
if (MmapFixedNoReserve(ShadowStart, ShadowEnd - ShadowStart, "shadow"))
|
||||
Map = ShadowStart;
|
||||
}
|
||||
if (Map != ShadowStart) {
|
||||
Printf("FATAL: EfficiencySanitizer failed to map its shadow memory.\n");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user