Skip to content

fix: avoid hex decoder UTF-8 slicing panic - #110

Open
vycdev2 wants to merge 1 commit into
vycdev:mainfrom
vycdev2:fix/encoding-hex-decode-non-ascii
Open

fix: avoid hex decoder UTF-8 slicing panic#110
vycdev2 wants to merge 1 commit into
vycdev:mainfrom
vycdev2:fix/encoding-hex-decode-non-ascii

Conversation

@vycdev2

@vycdev2 vycdev2 commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • decode hex input from raw bytes instead of slicing UTF-8 strings at byte offsets
  • preserve existing odd-length, invalid-hex, and invalid-UTF-8 errors
  • add direct comptime and registered runtime-failure regressions for non-ASCII input

Verification

  • cargo fmt --all -- --check
  • cargo check
  • cargo build
  • cargo test -q -p jett_comptime builtin_encoding_hex_decode_rejects_non_ascii_without_panicking
  • cargo test -q -p jett_driver encoding_hex_decode_rejects_non_ascii_without_panicking
  • cargo run -q -p jett_cli -- format --check tests/runtime_fail/encoding_hex_decode_non_ascii.jett
  • cargo test -q (433 driver tests passed)
  • git diff --check

Risk

This was generated by an AI agent (vycdev2). Please verify any changes before merging or applying.

vycdev commented Aug 10, 2026

Copy link
Copy Markdown
Owner

The byte-pair hex decoder correctly removes the UTF-8 slicing panic and its tests passed, but this branch now conflicts with current main in the shared interpreter/fixture area. Please rebase, preserve the already-merged encoding and checked-math regressions, and rerun comptime/driver tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants