mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 15:57:35 +00:00
LibJS: Use different stack space limit values for with and without ASAN
Instead of having a single limit here, which we had to increase once to
work with ASAN enabled, check whether HAS_ADDRESS_SANITIZER is defined
and use 32 KiB, and 16 KiB otherwise (which is what we used previously).
This idea is shamelessly stolen from V8:
b2b44af/src/execution/isolate.cc (L1381-L1387)
This commit is contained in:
parent
941ff0cf60
commit
6ffc8f389e
1 changed files with 4 additions and 1 deletions
|
@ -107,8 +107,11 @@ public:
|
|||
|
||||
bool did_reach_stack_space_limit() const
|
||||
{
|
||||
// Note: the 32 kiB used to be 16 kiB, but that turned out to not be enough with ASAN enabled.
|
||||
#ifdef HAS_ADDRESS_SANITIZER
|
||||
return m_stack_info.size_free() < 32 * KiB;
|
||||
#else
|
||||
return m_stack_info.size_free() < 16 * KiB;
|
||||
#endif
|
||||
}
|
||||
|
||||
void push_execution_context(ExecutionContext& context, GlobalObject& global_object)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue