Skip to content

fix: validate format capture length types - #332

Merged
swananan merged 1 commit into
mainfrom
fix/format-argument-types
Nov 4, 2026
Merged

swananan merged 1 commit into
mainfrom
fix/format-argument-types

Conversation

@swananan

@swananan swananan commented Nov 3, 2026

Copy link
Copy Markdown
Owner

Format capture lengths could accept DWARF pointers lowered to LLVM integers, and named lengths could convert script string pointers into byte counts. Validate source types before lowering .* and .name$ lengths, resolve aliases, and report the placeholder plus the offending argument or variable.

Keep no-length hex/ASCII conversions compatible with captured scalar and aggregate bytes. Add compiler and real-DWARF regression coverage and document the length requirement in English and Chinese.

Validation:

  • cargo fmt --all and formatting check passed.
  • Workspace cargo clippy --all-targets --all-features -- -D warnings -D clippy::undocumented_unsafe_blocks passed; compiler Clippy also passed after the final pointer-arithmetic check.
  • cargo test -p ghostscope-compiler --lib: 194 passed.
  • Full host-to-host e2e through the runner service: 424 passed, exit 0 (job a64c4585341c), including the new non-integer-length regression and existing format tests.
  • Container topology tests skipped because this change does not affect container behavior.

@swananan
swananan merged commit cd185fa into main Nov 4, 2026
15 of 24 checks passed
@swananan
swananan deleted the fix/format-argument-types branch November 4, 2026 03:30
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.

1 participant