You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Some Test262 tests can cause a stack overflow #1307
Loaded test/language/expressions/tagged-template/tco-call.js into a debugger and got an exception during eval of EXC_BAD_ACCESS(code=2, address=...), seems to occur at a memory copy of some variety, will continue stepping through to work through it.
EDIT: The specific testcases mentioned create 7000 stack frames, compared to most testcases only having 20 stack frames.
Also, the specific cases seem to recurse into runs and call procedures that nests to this stack frame depth, with the sequence of 3 run stack frames at mod.rs 108:23 315:37 114:27 , followed by 2 call stack frames at context.rs 320:42 and gcobject.rs 327:9, followed by a call_construct stack frame at gcobject.rs 300:30. Seems to be a recursive loop involving these calls... No idea which mod.rs it's referring to in LLDB, but any help would be appreciated.
I will try to give it a look in a couple of days, but something that can be tried is to see if the issue is in the parsing time or in the execution time, that would help a lot.
You can also try to extract a minimum example, especially if the issue is when parsing, and try to get all lexed tokens, to see if they make sense, by running the "boa" binary as mentioned in "DEBUGGING.md"
Actually, ended up actually reading up on the feature the testcase is testing, it's tail-call optimisation, and explains why the number of stack frames is so large, i.e. this optimisation would need to be implemented on Boa's side to fix both of these from overflowing.
Activity
neeldug commentedon Jun 19, 2021
Loaded
test/language/expressions/tagged-template/tco-call.jsinto a debugger and got an exception during eval ofEXC_BAD_ACCESS(code=2, address=...), seems to occur at a memory copy of some variety, will continue stepping through to work through it.EDIT: The specific testcases mentioned create 7000 stack frames, compared to most testcases only having 20 stack frames.
Also, the specific cases seem to recurse into runs and call procedures that nests to this stack frame depth, with the sequence of 3
runstack frames atmod.rs108:23 315:37 114:27 , followed by 2callstack frames atcontext.rs320:42 andgcobject.rs327:9, followed by acall_constructstack frame atgcobject.rs300:30. Seems to be a recursive loop involving these calls... No idea which mod.rs it's referring to in LLDB, but any help would be appreciated.This could be resolved by #1323 ?
Razican commentedon Jun 19, 2021
I will try to give it a look in a couple of days, but something that can be tried is to see if the issue is in the parsing time or in the execution time, that would help a lot.
You can also try to extract a minimum example, especially if the issue is when parsing, and try to get all lexed tokens, to see if they make sense, by running the "boa" binary as mentioned in "DEBUGGING.md"
neeldug commentedon Jun 19, 2021
Actually, ended up actually reading up on the feature the testcase is testing, it's tail-call optimisation, and explains why the number of stack frames is so large, i.e. this optimisation would need to be implemented on Boa's side to fix both of these from overflowing.
raskad commentedon May 7, 2023
@HalidOdat this got fixed by #2904 right?
HalidOdat commentedon May 7, 2023
Yes, The tests no longer cause stack overflows, because a
RuntimeLimitis thrown.So we can close this issue :)