fix(codegen): verify U+2028/U+2029 sourcemap panic fix is correct#19549
Closed
Copilot wants to merge 1 commit intoc/02-19-fix_codegen_avoid_sourcemap_panic_on_u_2028___u_2029_from
Closed
fix(codegen): verify U+2028/U+2029 sourcemap panic fix is correct#19549Copilot wants to merge 1 commit intoc/02-19-fix_codegen_avoid_sourcemap_panic_on_u_2028___u_2029_from
Copilot wants to merge 1 commit intoc/02-19-fix_codegen_avoid_sourcemap_panic_on_u_2028___u_2029_from
Conversation
Copilot
AI
changed the title
[WIP] Address feedback on sourcemap panic fix for
fix(codegen): verify U+2028/U+2029 sourcemap panic fix is correct
Feb 19, 2026
U+2028/U+2029
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.
Addresses a review concern that the LS/PS sourcemap panic fix in #19548 may have been reviewed against an older, unpatched version of the code.
Verification
Confirmed the current
update_generated_line_and_columnimplementation correctly handles LS (U+2028) and PS (U+2029) — theLS_OR_PS_FIRST_BYTEbranch returns3asline_break_byte_len, advancing bothline_start_indexandidxpast all 3 bytes of the sequence. This preventsfrom_utf8(&output[line_start_index..])from receiving a slice starting mid-codepoint and panicking.The test cases added in #19548 exercise the fix:
All 9
sourcemap_buildertests pass.🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.