Skip to content

Commit 5e66ddc

Browse files
committed
Unify the var name to rounded_size
1 parent b6bafb1 commit 5e66ddc

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

compiler-rt/lib/tsan/rtl/tsan_rtl.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -572,12 +572,12 @@ void UnmapShadow(ThreadState* thr, uptr addr, uptr size) {
572572
// unmap shadow is related to semantic of mmap/munmap, so we
573573
// should clear the whole shadow range, including the tail shadow
574574
// while addr + size % kShadowCell != 0.
575-
uptr size_for_shadow = RoundUp(addr + size, kShadowCell) - addr;
576-
DontNeedShadowFor(addr, size_for_shadow);
575+
uptr rounded_size_shadow = RoundUp(addr + size, kShadowCell) - addr;
576+
DontNeedShadowFor(addr, rounded_size_shadow);
577577
ScopedGlobalProcessor sgp;
578578
SlotLocker locker(thr, true);
579-
uptr size_for_meta = RoundUp(addr + size, kMetaShadowCell) - addr;
580-
ctx->metamap.ResetRange(thr->proc(), addr, size_for_meta, true);
579+
uptr rounded_size_meta = RoundUp(addr + size, kMetaShadowCell) - addr;
580+
ctx->metamap.ResetRange(thr->proc(), addr, rounded_size_meta, true);
581581
}
582582
#endif
583583

compiler-rt/lib/tsan/rtl/tsan_rtl_access.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -688,17 +688,17 @@ void MemoryAccessRangeT(ThreadState* thr, uptr pc, uptr addr, uptr size) {
688688
DCHECK(IsShadowMem(shadow_mem));
689689
}
690690

691-
uptr shadow_size =
691+
uptr rounded_size =
692692
(RoundUpTo(addr + size, kShadowCell) - RoundDownTo(addr, kShadowCell));
693693
RawShadow* shadow_mem_end =
694-
shadow_mem + shadow_size / kShadowCell * kShadowCnt;
694+
shadow_mem + rounded_size / kShadowCell * kShadowCnt;
695695
if (!IsShadowMem(shadow_mem_end - 1)) {
696696
Printf("Bad shadow end addr: %p (%p)\n", shadow_mem_end - 1,
697697
(void*)(addr + size - 1));
698698
Printf(
699-
"Shadow start addr (ok): %p (%p); size: 0x%zx; shadow_size: 0x%zx; "
699+
"Shadow start addr (ok): %p (%p); size: 0x%zx; rounded_size: 0x%zx; "
700700
"kShadowMultiplier: %zx\n",
701-
shadow_mem, (void*)addr, size, shadow_size, kShadowMultiplier);
701+
shadow_mem, (void*)addr, size, rounded_size, kShadowMultiplier);
702702
DCHECK(IsShadowMem(shadow_mem_end - 1));
703703
}
704704
#endif

0 commit comments

Comments
 (0)