The comparison reads the thread-local static frame relocation of a thread(*concurrent) module #781
Loading…
Reference in a new issue
No description provided.
Delete branch "lrel"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The comparison reads the thread-local static frame relocation of a thread(*concurrent) module
Lane Lrel.
sourcerer comparerefused everythread(*concurrent)program withunsupported_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 alsorefused against itself.
Where it refused
compare_ile.relocationData, theelse =>arm of the switch on the type ofeach activation relocation row (rows at
activation + 16, 16 bytes each, typein byte 4). Every other check of the function and of
constant_referencespasses on these objects.
What the twins show
The stripped twins against their plain siblings (
lext-call-void-cagainstlext-call-void-p, and the other thread captures oflext-thread-callandlext-psds-call, 31 captures):thread(*serialize)thread(*concurrent)00000004 00 000000 00000001 0000000000000004 0c 000000 00000001 00000000Type 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) isthe 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
relocationDatatakes type 0x0c as a static frame row, with the checks oftype 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 alreadyhashed, and
staticDataalready hashesactivation + 60to+80, so a plainmodule 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 againststripped, and against a plain sibling. After:
matchfor each stripped twinagainst itself and against its observable twin;
differentagainstlext-call-void-pandlext-serialize-c.src/compare_lrel_test.zigassertsthe 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-cstill refuses withunsupported_layoutinstaticData(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.shpassed every gate on itand stopped only at its final push, which a rebased branch needs
--force-with-leasefor. The head is thatcommit, re-stamped once after the pull request opened (the same tree).
emit-all.shagainst the v0.1.497baseline) are byte-identical; the L10 test direction is unchanged.
roundtrip.sh --recompare): ten rows change, all fromrefused / unsupported_relocationtodifferent(the six
lext-call-*-ctwins andlext-psds-arg-c,-read-c,-ret-c,-void-c); the other 28 keeptheir verdict. They are
differentand notmatchbecause the recovered source of athread(*concurrent)module does not carry the keyword yet.
the switch in
relocationDataand leaves the path of every other relocation type as it was.Gates (ship.sh, commit
6aebfaac):6aebfaacaf538a9877e4