Skip to content

Commit e15b36d

Browse files
committed
WebAssembly has no guard pages
Hence, IsAccessibleMemoryRange always returns true on Emscripten, so remove this block altogether.
1 parent 64889df commit e15b36d

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

system/lib/compiler-rt/lib/lsan/lsan_common_emscripten.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -150,15 +150,6 @@ static void ProcessThreadsCallback(ThreadContextBase *tctx, void *arg) {
150150
// signal handler on alternate stack, or swapcontext was used).
151151
// Again, consider the entire stack range to be reachable.
152152
LOG_THREADS("WARNING: stack pointer not in stack range.\n");
153-
uptr page_size = GetPageSizeCached();
154-
int skipped = 0;
155-
while (stack_begin < stack_end &&
156-
!IsAccessibleMemoryRange(stack_begin, 1)) {
157-
skipped++;
158-
stack_begin += page_size;
159-
}
160-
LOG_THREADS("Skipped %d guard page(s) to obtain stack %p-%p.\n",
161-
skipped, stack_begin, stack_end);
162153
} else {
163154
// Shrink the stack range to ignore out-of-scope values.
164155
stack_begin = sp;

0 commit comments

Comments
 (0)