Where: tri_asm.zig (the writer) and loader.zig (the reader) at 976df51.
What happens. tri_asm.zig pads its header to twelve bytes, while loader.load reads the code from byte ten.
- A written container loads shifted by two bytes, and its first word decodes from the two padding bytes.
- The owner's tests never load a written container: they copy it to byte 0 and run from word 3.
Source: specs/isa/tri27_bytecode.t27, FINDINGS. The invariant the_writer_header_exceeds_the_loader_header_by_two in the same spec pins the difference.
Expected.
- The writer and the loader agree on the header length.
- A test loads a container written by
tri_asm.zig through loader.load.
Vectors. Both are in conformance/trinity/tri27_programs.json:
load-good: the writer's container is accepted, but the code is taken from byte 10;
load-native: the ten-byte container the loader expects.
Found while writing the S05 specs of #988 (gHashTag/t27#3581); until now it lived only in the spec's FINDINGS. The vectors are replayed by tools/trinity_tri27.py in gHashTag/t27. Tracked in #1164.
Where:
tri_asm.zig(the writer) andloader.zig(the reader) at 976df51.What happens.
tri_asm.zigpads its header to twelve bytes, whileloader.loadreads the code from byte ten.Source:
specs/isa/tri27_bytecode.t27, FINDINGS. The invariantthe_writer_header_exceeds_the_loader_header_by_twoin the same spec pins the difference.Expected.
tri_asm.zigthroughloader.load.Vectors. Both are in
conformance/trinity/tri27_programs.json:load-good: the writer's container is accepted, but the code is taken from byte 10;load-native: the ten-byte container the loader expects.Found while writing the S05 specs of #988 (gHashTag/t27#3581); until now it lived only in the spec's FINDINGS. The vectors are replayed by
tools/trinity_tri27.pyin gHashTag/t27. Tracked in #1164.