Skip to content

Commit beded9b

Browse files
authored
[HWASan] Allow stack_history_size of 4096 (#86362)
There is no reason to limit the minimum to two pages.
1 parent c0c11e7 commit beded9b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler-rt/lib/hwasan/hwasan_thread_list.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
// * Start of the shadow memory region is aligned to 2**kShadowBaseAlignment.
1919
// * All stack ring buffers are located within (2**kShadowBaseAlignment)
2020
// sized region below and adjacent to the shadow region.
21-
// * Each ring buffer has a size of (2**N)*4096 where N is in [0, 8), and is
21+
// * Each ring buffer has a size of (2**N)*4096 where N is in [0, 7), and is
2222
// aligned to twice its size. The value of N can be different for each buffer.
2323
//
2424
// These constrains guarantee that, given an address A of any element of the
@@ -55,7 +55,7 @@ static uptr RingBufferSize() {
5555
uptr desired_bytes = flags()->stack_history_size * sizeof(uptr);
5656
// FIXME: increase the limit to 8 once this bug is fixed:
5757
// https://bugs.llvm.org/show_bug.cgi?id=39030
58-
for (int shift = 1; shift < 7; ++shift) {
58+
for (int shift = 0; shift < 7; ++shift) {
5959
uptr size = 4096 * (1ULL << shift);
6060
if (size >= desired_bytes)
6161
return size;

0 commit comments

Comments
 (0)