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) {
147147 if (!map && !protect) {
148148 CHECK (type == MappingDesc::APP || type == MappingDesc::ALLOCATOR);
149149
150- if (type == MappingDesc::ALLOCATOR &&
150+ if (dry_run && type == MappingDesc::ALLOCATOR &&
151151 !CheckMemoryRangeAvailability (start, size, !dry_run))
152152 return false ;
153153 }
154154 if (map) {
155- if (!CheckMemoryRangeAvailability (start, size, !dry_run))
155+ if (dry_run && !CheckMemoryRangeAvailability (start, size, !dry_run))
156156 return false ;
157157 if (!dry_run &&
158158 !MmapFixedSuperNoReserve (start, size, kMemoryLayout [i].name ))
@@ -161,7 +161,7 @@ static bool InitShadow(bool init_origins, bool dry_run) {
161161 DontDumpShadowMemory (start, size);
162162 }
163163 if (protect) {
164- if (!CheckMemoryRangeAvailability (start, size, !dry_run))
164+ if (dry_run && !CheckMemoryRangeAvailability (start, size, !dry_run))
165165 return false ;
166166 if (!dry_run && !ProtectMemoryRange (start, size, kMemoryLayout [i].name ))
167167 return false ;
You can’t perform that action at this time.
0 commit comments