File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -147,12 +147,12 @@ static bool InitShadow(bool init_origins, bool dry_run) {
147
147
if (!map && !protect) {
148
148
CHECK (type == MappingDesc::APP || type == MappingDesc::ALLOCATOR);
149
149
150
- if (type == MappingDesc::ALLOCATOR &&
150
+ if (dry_run && type == MappingDesc::ALLOCATOR &&
151
151
!CheckMemoryRangeAvailability (start, size, !dry_run))
152
152
return false ;
153
153
}
154
154
if (map) {
155
- if (!CheckMemoryRangeAvailability (start, size, !dry_run))
155
+ if (dry_run && !CheckMemoryRangeAvailability (start, size, !dry_run))
156
156
return false ;
157
157
if (!dry_run &&
158
158
!MmapFixedSuperNoReserve (start, size, kMemoryLayout [i].name ))
@@ -161,7 +161,7 @@ static bool InitShadow(bool init_origins, bool dry_run) {
161
161
DontDumpShadowMemory (start, size);
162
162
}
163
163
if (protect) {
164
- if (!CheckMemoryRangeAvailability (start, size, !dry_run))
164
+ if (dry_run && !CheckMemoryRangeAvailability (start, size, !dry_run))
165
165
return false ;
166
166
if (!dry_run && !ProtectMemoryRange (start, size, kMemoryLayout [i].name ))
167
167
return false ;
You can’t perform that action at this time.
0 commit comments