Skip to content

fix(sv)!: read heap strings in formatted scans - #2076

Merged
mergify[bot] merged 1 commit into
masterfrom
stack/tignear/fix/sv-tests-preprocessing/read-heap-strings-formatted-scans--982978c1
Oct 25, 2026
Merged

mergify[bot] merged 1 commit into
masterfrom
stack/tignear/fix/sv-tests-preprocessing/read-heap-strings-formatted-scans--982978c1

Conversation

@tignear

@tignear tignear commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

$sscanf read string handles as packed bytes, so a string source such as
"1234" failed to populate its integer destination. Carry ValueKind in host
request operands and use it for both GC roots and host string resolution.
Support string expressions for the source and for $sscanf/$fscanf formats
while retaining packed input behavior (IEEE 1800-2023 21.3.4.3).

Add shared regressions for discarded returns, temporary strings, dynamic
formats and empty input. Update the affected sv-tests case in both modes.
Version the native image container at 38 and reject old images before
postcard decoding; test both new scan cases through native-image roundtrips.

Validation: 30 shared scan backend tests, 8 API tests, 2 metadata tests,
5 configurations of the final temporary-string case, native-image roundtrip
and old-version rejection, Clippy and fmt. Verilator and Icarus each pass
the string-source case. The dynamic-format case is a documented external
limitation: Verilator rejects it and Icarus crashes even with a variable-only
format. Keep it enabled for Celox and retain the observed external evidence.
Full release-driver sv-tests validation runs in CI as requested.

BREAKING CHANGE: HostRequestValue requires value_kind in Rust struct literals.
Native program images from container version 37 and earlier must be rebuilt.

Depends-On: #2075

@tignear

tignear commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor Author

This pull request is part of a Mergify stack:

# Pull Request Link
1 fix(sv): validate enum initializer declarations #2075
2 fix(sv)!: read heap strings in formatted scans #2076 👈
3 feat(sv)!: execute final procedures at simulation termination #2088

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-25T21:47:54.562521Z 5cc033c New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@tignear tignear added the merge-ready Request merging through Mergify after required checks label Oct 25, 2026
@tignear
tignear force-pushed the stack/tignear/fix/sv-tests-preprocessing/read-heap-strings-formatted-scans--982978c1 branch from 3c3ca26 to e187e5e Compare October 25, 2026 20:55
@tignear
tignear force-pushed the stack/tignear/fix/sv-tests-preprocessing/validate-enum-initializer-declarations--71ba3443 branch from bbd167c to 4082ff4 Compare October 25, 2026 20:55
@tignear

tignear commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor Author

Revision history

# Type Changes Reason Date
1 initial 3c3ca26 2026-10-25 20:53 UTC
2 rebase 3c3ca26 → e187e5e (rebase only) Fix PR 2075 regression coverage: distinguish sized enum width errors from out-of-range values 2026-10-25 20:53 UTC
3 content e187e5e → 5cc033c Fix PR 2076 CI: retain the reviewed dynamic scan-format exclusions required by retained_reports 2026-10-25 21:45 UTC

$sscanf read string handles as packed bytes, so a string source such as
"1234" failed to populate its integer destination. Carry ValueKind in host
request operands and use it for both GC roots and host string resolution.
Support string expressions for the source and for $sscanf/$fscanf formats
while retaining packed input behavior (IEEE 1800-2023 21.3.4.3).

Add shared regressions for discarded returns, temporary strings, dynamic
formats and empty input. Update the affected sv-tests case in both modes.
Version the native image container at 38 and reject old images before
postcard decoding; test both new scan cases through native-image roundtrips.

Validation: 30 shared scan backend tests, 8 API tests, 2 metadata tests,
5 configurations of the final temporary-string case, native-image roundtrip
and old-version rejection, Clippy and fmt. Verilator and Icarus each pass
the string-source case. The dynamic-format case is a documented external
limitation: Verilator rejects it and Icarus crashes even with a variable-only
format. Keep it enabled for Celox and retain the observed external evidence.
Full release-driver sv-tests validation runs in CI as requested.

BREAKING CHANGE: HostRequestValue requires value_kind in Rust struct literals.
Native program images from container version 37 and earlier must be rebuilt.

Change-Id: I982978c1d365c983441526595dd3cb454cae718a
@tignear
tignear force-pushed the stack/tignear/fix/sv-tests-preprocessing/validate-enum-initializer-declarations--71ba3443 branch from 4082ff4 to 728b37d Compare October 25, 2026 21:46
@tignear
tignear force-pushed the stack/tignear/fix/sv-tests-preprocessing/read-heap-strings-formatted-scans--982978c1 branch from e187e5e to 5cc033c Compare October 25, 2026 21:46
@mergify

mergify Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Queued — the merge queue status continues in this comment ↓.

@mergify mergify Bot added the queued Mergify queue entry label Oct 25, 2026
@mergify

mergify Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

This pull request spent 26 minutes 24 seconds in the queue, including 23 minutes 8 seconds running CI.

Required conditions to merge
  • check-success = Conventional Commit title
  • check-success = Queue validation
  • depends-on = celox-sim/celox#2075 [⛓️ fix(sv): validate enum initializer declarations #2075]
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/Lint & Format
    • check-neutral = @github-actions/Lint & Format
    • check-skipped = @github-actions/Lint & Format
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/NAPI Build (Linux ARM64 GNU)
    • check-neutral = @github-actions/NAPI Build (Linux ARM64 GNU)
    • check-skipped = @github-actions/NAPI Build (Linux ARM64 GNU)
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/NAPI Build (Windows)
    • check-neutral = @github-actions/NAPI Build (Windows)
    • check-skipped = @github-actions/NAPI Build (Windows)
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/Rust Test & NAPI Build
    • check-neutral = @github-actions/Rust Test & NAPI Build
    • check-skipped = @github-actions/Rust Test & NAPI Build
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/JS Test (Ubuntu)
    • check-neutral = @github-actions/JS Test (Ubuntu)
    • check-skipped = @github-actions/JS Test (Ubuntu)
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/JS Test (Windows)
    • check-neutral = @github-actions/JS Test (Windows)
    • check-skipped = @github-actions/JS Test (Windows)
  • any of [🛡 GitHub repository ruleset rule master]:
    • check-success = @github-actions/Conventional Commit title
    • check-neutral = @github-actions/Conventional Commit title
    • check-skipped = @github-actions/Conventional Commit title

Base automatically changed from stack/tignear/fix/sv-tests-preprocessing/validate-enum-initializer-declarations--71ba3443 to master October 25, 2026 22:45
@mergify
mergify Bot merged commit 16cfc39 into master Oct 25, 2026
26 of 44 checks passed
@mergify
mergify Bot deleted the stack/tignear/fix/sv-tests-preprocessing/read-heap-strings-formatted-scans--982978c1 branch October 25, 2026 22:46
@mergify mergify Bot removed the queued Mergify queue entry label Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-ready Request merging through Mergify after required checks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant