The comparison reads the thread-local static frame relocation of a thread(*concurrent) module #781

Manually merged
binjovi-bot merged 1 commit from lrel into trunk 2026-11-10 19:19:28 +00:00
Owner

The comparison reads the thread-local static frame relocation of a thread(*concurrent) module

Lane Lrel. sourcerer compare refused every thread(*concurrent) program with
unsupported_relocation; six committed twins showed it
(EXPERIMENTS/lext-call-void-c, -const-c, -value-c, -ref-c, -nested-c,
-ret-c), the observable and the stripped object alike, so each twin also
refused against itself.

Where it refused

compare_ile.relocationData, the else => arm of the switch on the type of
each activation relocation row (rows at activation + 16, 16 bytes each, type
in byte 4). Every other check of the function and of constant_references
passes on these objects.

What the twins show

The stripped twins against their plain siblings (lext-call-void-c against
lext-call-void-p, and the other thread captures of lext-thread-call and
lext-psds-call, 31 captures):

plain / thread(*serialize) thread(*concurrent)
row 0 of the activation relocations (slot 4) 00000004 00 000000 00000001 00000000 00000004 0c 000000 00000001 00000000
activation header +60 (u32) 1 0
activation header +68 (u32) 0 1
static frame size (the void pair) 3088 3104 (+16)

Type 0x0c has the fields of type 0 (the frame count 1 at +8, the frame offset
at +12) and fills the same static frame slot; the header counts the frame at
+68 instead of +60. The 0x0100 bit of every static symbol (Symbol.flags) is
the same fact. thread(*serialize) keeps type 0 and +60 (lext-serialize-c).
The other rows (type 0x0b constant area, type 6 imports) are the same in both.

The rule

relocationData takes type 0x0c as a static frame row, with the checks of
type 0, and requires the header counts of a thread-local frame: +60 is 0 and
+68 is 1, else InvalidRelocation. The row bytes, with the type, were already
hashed, and staticData already hashes activation + 60 to +80, so a plain
module and a thread-local one never compare equal; no check for an object
without type 0x0c changed. Any other type still refuses.

Result

Before: all six refused (unsupported_relocation), self, observable against
stripped, and against a plain sibling. After: match for each stripped twin
against itself and against its observable twin; different against
lext-call-void-p and lext-serialize-c. src/compare_lrel_test.zig asserts
the six self matches, the observable match, the two differences, a refusal for
type 0x0d, a difference for a moved frame offset and for a type 0 row in a
thread module, and the refusal of a type 0x0c row the header does not count.
Of the 31 public thread captures, 30 compare (stripped against itself and
against its observable twin); lext-static-all-c still refuses with
unsupported_layout in staticData (not this change).

Release gate (coordinator, before this pull request)

Checked on the binary of commit 6aebfaac (this branch rebased onto v0.1.497). ship.sh passed every gate on it
and stopped only at its final push, which a rebased branch needs --force-with-lease for. The head is that
commit, re-stamped once after the pull request opened (the same tree).

  • No emit changes: the development emits and every committed public twin (emit-all.sh against the v0.1.497
    baseline) are byte-identical; the L10 test direction is unchanged.
  • Offline re-compare of the stored matrix round trips of the v0.1.496 and v0.1.497 snapshots (38 cases,
    roundtrip.sh --recompare): ten rows change, all from refused / unsupported_relocation to different
    (the six lext-call-*-c twins and lext-psds-arg-c, -read-c, -ret-c, -void-c); the other 28 keep
    their verdict. They are different and not match because the recovered source of a thread(*concurrent)
    module does not carry the keyword yet.
  • Older matrix captures are pruned, so the whole matrix could not be re-compared; the change adds one case to
    the switch in relocationData and leaves the path of every other relocation type as it was.

Gates (ship.sh, commit 6aebfaac):

{
  "checks": {
    "net_statements": 0
  },
  "census": {
    "statuses": {
      "recovered": 645,
      "partial": 0,
      "unresolved": 0
    },
    "regressions": 0,
    "newly_recovered": 0
  },
  "golden": "golden floor 173 ceiling 0 <= dump 173/5/0",
  "legend": "current",
  "emit": {
    "worse": [],
    "better": 0,
    "newly_clean": 0,
    "clean_delta": 0,
    "base": 588,
    "new": 588
  },
  "twins": {
    "groups": 826,
    "recovered": 804,
    "regressions": [],
    "newly": 0
  },
  "allgroups": {
    "regressions": [],
    "newly": [],
    "worse": []
  },
  "full_check": {
    "exit": 0,
    "seconds": 1140
  }
}
# The comparison reads the thread-local static frame relocation of a thread(*concurrent) module Lane Lrel. `sourcerer compare` refused every `thread(*concurrent)` program with `unsupported_relocation`; six committed twins showed it (`EXPERIMENTS/lext-call-void-c`, `-const-c`, `-value-c`, `-ref-c`, `-nested-c`, `-ret-c`), the observable and the stripped object alike, so each twin also refused against itself. ## Where it refused `compare_ile.relocationData`, the `else =>` arm of the switch on the type of each activation relocation row (rows at `activation + 16`, 16 bytes each, type in byte 4). Every other check of the function and of `constant_references` passes on these objects. ## What the twins show The stripped twins against their plain siblings (`lext-call-void-c` against `lext-call-void-p`, and the other thread captures of `lext-thread-call` and `lext-psds-call`, 31 captures): | | plain / `thread(*serialize)` | `thread(*concurrent)` | |---|---|---| | row 0 of the activation relocations (slot 4) | `00000004 00 000000 00000001 00000000` | `00000004 0c 000000 00000001 00000000` | | activation header +60 (u32) | 1 | 0 | | activation header +68 (u32) | 0 | 1 | | static frame size (the void pair) | 3088 | 3104 (+16) | Type 0x0c has the fields of type 0 (the frame count 1 at +8, the frame offset at +12) and fills the same static frame slot; the header counts the frame at +68 instead of +60. The 0x0100 bit of every static symbol (`Symbol.flags`) is the same fact. `thread(*serialize)` keeps type 0 and +60 (lext-serialize-c). The other rows (type 0x0b constant area, type 6 imports) are the same in both. ## The rule `relocationData` takes type 0x0c as a static frame row, with the checks of type 0, and requires the header counts of a thread-local frame: +60 is 0 and +68 is 1, else `InvalidRelocation`. The row bytes, with the type, were already hashed, and `staticData` already hashes `activation + 60` to `+80`, so a plain module and a thread-local one never compare equal; no check for an object without type 0x0c changed. Any other type still refuses. ## Result Before: all six refused (`unsupported_relocation`), self, observable against stripped, and against a plain sibling. After: `match` for each stripped twin against itself and against its observable twin; `different` against `lext-call-void-p` and `lext-serialize-c`. `src/compare_lrel_test.zig` asserts the six self matches, the observable match, the two differences, a refusal for type 0x0d, a difference for a moved frame offset and for a type 0 row in a thread module, and the refusal of a type 0x0c row the header does not count. Of the 31 public thread captures, 30 compare (stripped against itself and against its observable twin); `lext-static-all-c` still refuses with `unsupported_layout` in `staticData` (not this change). ## Release gate (coordinator, before this pull request) Checked on the binary of commit 6aebfaac (this branch rebased onto v0.1.497). `ship.sh` passed every gate on it and stopped only at its final push, which a rebased branch needs `--force-with-lease` for. The head is that commit, re-stamped once after the pull request opened (the same tree). - No emit changes: the development emits and every committed public twin (`emit-all.sh` against the v0.1.497 baseline) are byte-identical; the L10 test direction is unchanged. - Offline re-compare of the stored matrix round trips of the v0.1.496 and v0.1.497 snapshots (38 cases, `roundtrip.sh --recompare`): ten rows change, all from `refused / unsupported_relocation` to `different` (the six `lext-call-*-c` twins and `lext-psds-arg-c`, `-read-c`, `-ret-c`, `-void-c`); the other 28 keep their verdict. They are `different` and not `match` because the recovered source of a `thread(*concurrent)` module does not carry the keyword yet. - Older matrix captures are pruned, so the whole matrix could not be re-compared; the change adds one case to the switch in `relocationData` and leaves the path of every other relocation type as it was. Gates (ship.sh, commit 6aebfaac): ```json { "checks": { "net_statements": 0 }, "census": { "statuses": { "recovered": 645, "partial": 0, "unresolved": 0 }, "regressions": 0, "newly_recovered": 0 }, "golden": "golden floor 173 ceiling 0 <= dump 173/5/0", "legend": "current", "emit": { "worse": [], "better": 0, "newly_clean": 0, "clean_delta": 0, "base": 588, "new": 588 }, "twins": { "groups": 826, "recovered": 804, "regressions": [], "newly": 0 }, "allgroups": { "regressions": [], "newly": [], "worse": [] }, "full_check": { "exit": 0, "seconds": 1140 } } ```
Read the thread-local static frame relocation in the comparison
Some checks reported errors
binjovi/ci A newer source or plan superseded this Build
6aebfaacaf
A thread(*concurrent) module fills the static frame slot with a relocation
row of type 0x0c, counted at activation header +68. relocationData refused
it as an unsupported relocation, so every such twin refused, even against
itself. Accept it with the checks of type 0 and the header counts; every
other type still refuses.
sean force-pushed lrel from 6aebfaacaf
Some checks reported errors
binjovi/ci A newer source or plan superseded this Build
to 538a9877e4
All checks were successful
binjovi/ci Binjovi completed the frozen plan
2026-11-10 19:09:16 +00:00
Compare
binjovi-bot manually merged commit 538a9877e4 into trunk 2026-11-10 19:19:28 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
sean/sourcerer!781
No description provided.