Skip to content

Commit 96845f2

Browse files
committed
Replace other usages of 1 << kMaxStackFrameSizeLog
1 parent 44b8a3c commit 96845f2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler-rt/lib/asan/asan_fake_stack.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,14 @@ FakeStack *FakeStack::Create(uptr stack_size_log) {
6262
: MmapOrDie(padded_size, "FakeStack"));
6363
// GetFrame() requires the property that
6464
// (res + kFlagsOffset + SizeRequiredForFlags(stack_size_log)) is aligned to
65-
// (1 << kMaxStackFrameSizeLog).
65+
// kMaxStackFrameSize.
6666
// We didn't use MmapAlignedOrDieOnFatalError, because it requires that the
6767
// *size* is a power of 2, which is an overly strong condition.
6868
static_assert(alignof(FakeStack) <= kMaxStackFrameSize);
6969
FakeStack *res = reinterpret_cast<FakeStack *>(
7070
RoundUpTo(
7171
(uptr)true_res + kFlagsOffset + SizeRequiredForFlags(stack_size_log),
72-
1 << kMaxStackFrameSizeLog) -
72+
kMaxStackFrameSize) -
7373
kFlagsOffset - SizeRequiredForFlags(stack_size_log));
7474
res->true_start = true_res;
7575
res->stack_size_log_ = stack_size_log;

0 commit comments

Comments
 (0)