[compiler-rt] [ASan] Prevent ASan/LSan deadlock by preloading modules before error reporting (PR #131756)

David Justo via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 22 13:46:20 PDT 2025


davidmrdavid wrote:

Just an FYI - on msvc's ASan, which is based off the llvm codebase, we're seeing the fuzzer test [`stack-overflow-with-asan.test`](https://github.com/llvm/llvm-project/blob/6f1adbdb2b6f21d81e491c9ddd307fca0d183850/compiler-rt/test/fuzzer/stack-overflow-with-asan.test) failing after this change.

That test expects ASan to report stack overflow error, but after this change, the program crashes prior to being able to report the stack overflow. This is because we're adding more work (and thus more stack frames) in the `ScopedInErrorReport` constructor when we're already low on stack frame space, so we blow past the limit and exit abruptly.

I haven't had the chance to test this with clang on windows, but I wanted to flag this behavior in case it's reproducible with clang. In any case, it would be great to find a fix for this deadlock that meshes will with trying to report a stack overflow.

https://github.com/llvm/llvm-project/pull/131756


More information about the llvm-commits mailing list