From f71584b917651f8068a1d36d92ee4a8595d2b6dd Mon Sep 17 00:00:00 2001 From: Morten Larsen Date: Thu, 20 Jan 2022 13:35:55 +0100 Subject: [PATCH] LibJS: Increase margin in check for stack space limit test-js crashes with a segmentation fault when running on macOS on Arm. Increasing the margin in the test in did_reach_stack_space_limit() to 32 * KiB makes the tests pass. To simplify the code, this is applied independently of platform, and the previous test for use of an address sanitizer is removed. --- Userland/Libraries/LibJS/Runtime/VM.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Userland/Libraries/LibJS/Runtime/VM.h b/Userland/Libraries/LibJS/Runtime/VM.h index 6d7e50029d..6e420415e5 100644 --- a/Userland/Libraries/LibJS/Runtime/VM.h +++ b/Userland/Libraries/LibJS/Runtime/VM.h @@ -83,11 +83,9 @@ public: bool did_reach_stack_space_limit() const { -#ifdef HAS_ADDRESS_SANITIZER + // Address sanitizer (ASAN) used to check for more space but + // currently we can't detect the stack size with it enabled. return m_stack_info.size_free() < 32 * KiB; -#else - return m_stack_info.size_free() < 16 * KiB; -#endif } ThrowCompletionOr push_execution_context(ExecutionContext& context, GlobalObject& global_object)