Repository navigation
Decode supplementary Unicode in shader index JSON (SHADER-INDEX-SURROGATE-PAIRS) - #2045
Open
alexandersato0830 wants to merge 1 commit into
Open
alexandersato0830 wants to merge 1 commit into
alexandersato0830 wants to merge 1 commit into
Conversation
Contributor
|
Tested on Windows 11 (
AI-assisted. |
Contributor
|
Verified by OreoFR
Note: shares AI-assisted (Claude Code, Claude Opus 5.5). |
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.
Claimed in the coordination issue as: SHADER-INDEX-SURROGATE-PAIRS
What and why
JSON writers can encode one character outside the Basic Multilingual Plane as two
\uescapes. The shader index reader currently encodes those surrogate code units separately, producing invalid UTF-8. Join the pair into one Unicode code point before emitting UTF-8, and refuse an unpaired surrogate. This changes JSON decoding. PR #2043 handles the separate filesystem conversion. RFC 8259, String encodingTested
9f9a7c5f3and passes with the fix. It checks a supplementary object key, the highest Unicode code point as a value, and isolated, mismatched or truncated surrogate pairs.shader_library_testand ran the CMakeshader_librarytest in RelWithDebInfo on Windows 11 with MSVC 19.51. All cases passed.git diff --checkand the source-only check passed.GPUs tested: n/a (CPU-only parser test)
AI-assisted: yes (Codex)
Checklist
main.