llvm-project
6826f1a6 - [ASan] Fix UnpoisonDefaultStack stack bottom estimation (#178137)

Commit
3 days ago
[ASan] Fix UnpoisonDefaultStack stack bottom estimation (#178137) UnpoisonDefaultStack estimates the stack bottom as: ``` bottom = ((uptr)&local_stack - page_size) & ~(page_size - 1); ``` However, this can try to poision memory that doesn't have a shadow (i.e. AddrIsInMem(x) is false) if the local_stack variable is within two pages of the actual bottom of the space available for stack. This causes the unpoison-alternate-stack.cpp test (which allocates a very small stack) to fail. This PR changes this computation to check AddrIsInMem before subtracting the additional page. rdar://82645815
Author
Parents
Loading