Skip to content

std.zlib speaks the corpus's u64; the stc harness and the D156 array assertions (other-host seams of #2596) - #2597

Merged
ehartford merged 3 commits into
mainfrom
zlib-seam
Oct 24, 2026
Merged

ehartford merged 3 commits into
mainfrom
zlib-seam

Conversation

@ehartford

Copy link
Copy Markdown
Contributor

The seams the other hosts found in D155/D156 (f36cf4f), from the corpus tests on eric-5090 and win10:

  • std.zlib speaks the corpus's widths. The zlib engine is LP64, so its uLong is u64 on every host; std.zlib passed the host's c_ulong, which on Windows is u32: &raw mut out_len no longer met compress2's *mut u64 under the pointer rule and *dest_len = stream.total_out narrowed, so stage2 refused on win10. The facade over a corpus spells the corpus's width (D156).
  • The stc test harness spells its C strings c_char; its p as *const u8 into with_str_from_cstr was refused on every host (stc-test, stc-test-fresh, and through them corpus-migrator-gate in :release-checks).
  • c-migrator-core-tests: the two D156 array assertions added with D155/D156: the C aliases are the target's builtins; a corpus is compiled against one data model, explicit in its text #2596 expected literal suffixes; the migrator emits clang's folded literal in a List[u32]/List[i64] (D119), which is what they now assert.

Verified: all six corpus test targets green on eric-5090 (linux-x86_64, pinned local-2 seed) and on win10 (windows-x86_64, pinned local-2 seed) at 93b447a. Battery pending; posted below before this leaves draft.

Eric Hartford added 3 commits October 24, 2026 00:46
…long (D156)

The zlib engine is migrated against LP64, so its `uLong` parameters and the
stream's `total_out` are `u64` in every build. std.zlib still passed its
lengths as the host's `c_ulong`: on Windows (LLP64) that is u32, so
`&raw mut out_len` no longer met `compress2`'s `*mut u64` under the pointer
rule and `*dest_len = stream.total_out` narrowed, and stage2 refused
(win10, 2026-10-24). The facade over a corpus spells the corpus's width; the
seam to the host is std.zlib's own `len()` conversions, which already widen.
…fused its u8 cast on every host; stc-test, eric-5090 2026-10-24)
@ehartford

Copy link
Copy Markdown
Contributor Author

Battery green on 93b447a (seed-driven, with run tools/battery.w; out/battery/status.txt: green). Corpus tests green on eric-5090 and win10 at the same commit.

@ehartford
ehartford marked this pull request as ready for review October 24, 2026 05:08
@ehartford
ehartford merged commit c1ea1de into main Oct 24, 2026
@ehartford
ehartford deleted the zlib-seam branch October 24, 2026 05:08
ehartford pushed a commit that referenced this pull request Oct 24, 2026
…and the D119 u64 table read what the migrator emits)
ehartford pushed a commit that referenced this pull request Oct 24, 2026
…lls c_char (the other-host seams of #2597)

On Windows (LLP64) std.zlib passed the host c_ulong (u32) where the LP64 corpus takes u64: stage2 refused the narrowing (win10 leg legrung). The stc harness cast its byte pointer to *const u8 into with_str_from_cstr(*const c_char), red where c_char is i8.
ehartford added a commit that referenced this pull request Oct 24, 2026
…eds (nightly-20261024-local-2-6138da7f1565, nightly-20261024-local-2-f5443bac4111) (#2608)

Main has not built on either host since #2599 (compiler sources spell c_char; the local-2 bridge seeds have no such builtin): eric-5090 :dev on 91eebb3 fails with `unknown type c_char`. The rung seed-bridge-20261024 (the 20261023 bridge plus the D155 builtins, std/rt c_char, the D156 migrator, the re-promoted corpora and test programs, main's seed.lock and the #2597/#2607 seams) was cut on eric-5090 (rung 6138da7, release-checks green, ~/seed-leg-logs/nightly-20261024-local-2-6138da7f1565) and win10 (rung f5443ba, legrung3 green, asset published from the laptop). Main-based seeds follow this pin. Workflow pins rewritten by tools/bump_seed_pins.w.

Co-authored-by: Eric Hartford <[email protected]>
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