LibJS: Increase the stack limit on macOS with ASAN enabled

The macOS 14 runners on GitHub Actions fail with a stack overflow
otherwise.
This commit is contained in:
Timothy Flynn 2024-05-08 10:03:43 -04:00 committed by Andrew Kaster
parent e1aecff2ab
commit 323c9edbb9
Notes: sideshowbarker 2024-07-17 07:19:27 +09:00

View file

@ -96,9 +96,12 @@ public:
bool did_reach_stack_space_limit() const
{
// Address sanitizer (ASAN) used to check for more space but
// currently we can't detect the stack size with it enabled.
#if defined(AK_OS_MACOS) && defined(HAS_ADDRESS_SANITIZER)
// We hit stack limits sooner on macOS 14 arm64 with ASAN enabled.
return m_stack_info.size_free() < 96 * KiB;
#else
return m_stack_info.size_free() < 32 * KiB;
#endif
}
// TODO: Rename this function instead of providing a second argument, now that the global object is no longer passed in.