escargot/src
Seonghyun Kim e7221f4211 Fix labeled continue targeting a for-of loop (Issue #1577 Crash #1)
`L: for (const v of [...]) { continue L; }` aborted with
Assertion `!v.isEmpty()' failed, and `continue OUTER` from a nested
loop silently terminated the script.

A `continue <label>` whose label targets a for-of loop was left to be
resolved by LabelledStatementNode after the loop body, by which point
the for-of iterator-cleanup try block had registered the jump as a
complex case. It was then morphed into a JumpComplexCase that unwound
the try block, wrongly closing the iterator and leaving an empty Value
in the result register.

A previous per-loop attempt (8fd141b2) was reverted (60b1202a) because
a single m_currentLoopLabel leaked into nested loops and broke test262.

Track all labels directly targeting a loop (m_currentLoopLabels), clear
the list when entering each loop body so nested loops never inherit it,
and let for-of/for-in resolve continues for its own labels to
continuePosition (a plain jump, identical to an unlabeled continue)
before the try block is registered as a complex case.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
2026-06-17 10:06:57 +09:00
..
api In Evaluator::EvaluatorResult::resultOrErrorToString error can be null even if the task was successful 2026-05-14 13:33:33 +09:00
builtins Fix crash in ArrayBuffer transfer 2026-05-27 11:31:45 +09:00
codecache Validate input on CodeCacheReader 2026-04-08 10:00:03 +09:00
debugger Improve eval in devtools 2026-06-10 10:48:28 +09:00
heap Handle oom explicitly 2026-05-14 13:33:33 +09:00
interpreter Fix labeled continue targeting a for-of loop (Issue #1577 Crash #1) 2026-06-17 10:06:57 +09:00
intl Fix typo in Intl::initNumberFormatSkeleton 2026-01-27 12:57:45 +09:00
parser Fix labeled continue targeting a for-of loop (Issue #1577 Crash #1) 2026-06-17 10:06:57 +09:00
runtime Add support for scope variables and call stack in the Devtools Debugger 2026-06-10 10:44:10 +09:00
shell Implement escargot debugger restart support 2026-05-07 16:12:31 +09:00
util Treat timezones correctly 2025-12-02 13:41:54 +09:00
wasm Implement Global::finalizeGC to prevent memory leak 2026-01-30 09:54:22 +09:00
Escargot.h Disable GC on c++ catch block w/ASAN 2026-05-14 13:33:33 +09:00
EscargotInfo.h.in Add Escargot version configuration 2020-10-15 18:59:15 +09:00