summaryrefslogtreecommitdiff
path: root/Userland/Libraries
diff options
context:
space:
mode:
authorMorten Larsen <morten.larsen@anywi.com>2022-01-20 13:35:55 +0100
committerIdan Horowitz <idan.horowitz@gmail.com>2022-01-21 13:37:27 +0200
commitf71584b917651f8068a1d36d92ee4a8595d2b6dd (patch)
tree3023ca8329959aa3613c58785802c7725b82c6f4 /Userland/Libraries
parent2ed4e473009538b2c1c15b6ac2a90576a7fd39d5 (diff)
downloadserenity-f71584b917651f8068a1d36d92ee4a8595d2b6dd.zip
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.
Diffstat (limited to 'Userland/Libraries')
-rw-r--r--Userland/Libraries/LibJS/Runtime/VM.h6
1 files 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<void> push_execution_context(ExecutionContext& context, GlobalObject& global_object)