Conversation
`logOpcodeSlice` ended its walk by parking the cursor at `-_size`. That was inert when `offset` was a plain field, but `seek` decodes the header eagerly, so it read the heap at a negative address and threw under LOCAL_DEBUG -- which LOCAL_TRACE_LOGGING implies. Since `debugCompiler` calls `logOpcodeSlice` for every compiled template, template compilation died as soon as trace logging was turned on. The line had no readers, so it is simply removed. `RuntimeOpImpl.offset` becomes a getter over a private field. It was the one remaining way to move the cursor without refreshing `type`, `size` and `isMachine`, which would leave the decoded header describing one instruction while `op1`/`op2`/`op3` read another. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01A8ja8hgWMpTns6ezSXEMzr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
One possible direction for the two failures in #41. Not a proposal for emberjs#21602 itself — just what I verified turns them green.
opcode.seek(-_size)inlogOpcodeSlice. It had no readers; it was only inert before becauseoffsetwas a plain field write.RuntimeOpImpl.offseta getter over a private field, soseekis the only way to move the cursor.Full suite on this branch: 9465 tests, 0 failures.
Caveat: trace logging already crashes on the emberjs#21602 base, in
describeValueduring template normalization, well beforelogOpcodeSliceis reached. So this fixes the second crash on a path that is already broken.Cowritten by claude