File tree Expand file tree Collapse file tree 2 files changed +4
-10
lines changed
compiler-rt/lib/scudo/standalone Expand file tree Collapse file tree 2 files changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -1553,16 +1553,6 @@ class Allocator {
1553
1553
constexpr u32 kFramesPerStack = 16 ;
1554
1554
static_assert (isPowerOfTwo (kFramesPerStack ));
1555
1555
1556
- // We need StackDepot to be aligned to 8-bytes so the ring we store after
1557
- // is correctly assigned.
1558
- static_assert (sizeof (StackDepot) % alignof (atomic_u64) == 0 );
1559
-
1560
- // Make sure the maximum sized StackDepot fits withint a uintptr_t to
1561
- // simplify the overflow checking.
1562
- static_assert (sizeof (StackDepot) + UINT32_MAX * sizeof (atomic_u64) *
1563
- UINT32_MAX * sizeof (atomic_u32) <
1564
- UINTPTR_MAX);
1565
-
1566
1556
if (AllocationRingBufferSize > kMaxU32Pow2 / kStacksPerRingBufferEntry )
1567
1557
return ;
1568
1558
u32 TabSize = static_cast <u32 >(roundUpPowerOfTwo (kStacksPerRingBufferEntry *
Original file line number Diff line number Diff line change @@ -199,6 +199,10 @@ class alignas(atomic_u64) StackDepot {
199
199
void enable () NO_THREAD_SAFETY_ANALYSIS { RingEndMu.unlock (); }
200
200
};
201
201
202
+ // We need StackDepot to be aligned to 8-bytes so the ring we store after
203
+ // is correctly assigned.
204
+ static_assert (sizeof (StackDepot) % alignof (atomic_u64) == 0 );
205
+
202
206
} // namespace scudo
203
207
204
208
#endif // SCUDO_STACK_DEPOT_H_
You can’t perform that action at this time.
0 commit comments