LibJS: Increase free stack space required for function calls to 32 kiB

The previous 16 kiB weren't sufficient with ASAN enabled and would
trigger stack overflow failures.
This commit is contained in:
Linus Groh 2021-05-17 18:03:10 +01:00
parent 0aab774343
commit b9d3df70e0
Notes: sideshowbarker 2024-07-19 01:59:31 +09:00

View File

@ -96,8 +96,8 @@ public:
{
VERIFY(!exception());
// Ensure we got some stack space left, so the next function call doesn't kill us.
// This value is merely a guess and might need tweaking at a later point.
if (m_stack_info.size_free() < 16 * KiB)
// Note: the 32 kiB used to be 16 kiB, but that turned out to not be enough with ASAN enabled.
if (m_stack_info.size_free() < 32 * KiB)
throw_exception<Error>(global_object, "Call stack size limit exceeded");
else
m_call_stack.append(&call_frame);