mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-21 14:17:03 +00:00
[asan] Print diagnostic if unlimited stack size detected (#133170)
This adds a diagnostic message if the stack size is unlimited. This would have simplified the diagnosis of https://github.com/google/sanitizers/issues/856#issuecomment-2747076811; we anticipate this may help diagnose future issues too.
This commit is contained in:
parent
64178316cf
commit
e5ec87f3b6
@ -451,6 +451,18 @@ static bool AsanInitInternal() {
|
||||
|
||||
DisableCoreDumperIfNecessary();
|
||||
|
||||
#if SANITIZER_POSIX
|
||||
if (StackSizeIsUnlimited()) {
|
||||
VPrintf(1,
|
||||
"WARNING: Unlimited stack size detected. This may affect "
|
||||
"compatibility with the shadow mappings.\n");
|
||||
// MSan and TSan re-exec with a fixed size stack. We don't do that because
|
||||
// it may break the program. InitializeShadowMemory() will, if needed,
|
||||
// re-exec without ASLR, which solves most shadow mapping compatibility
|
||||
// issues.
|
||||
}
|
||||
#endif // SANITIZER_POSIX
|
||||
|
||||
InitializeShadowMemory();
|
||||
|
||||
AsanTSDInit(PlatformTSDDtor);
|
||||
|
Loading…
x
Reference in New Issue
Block a user