Files
ROT-8-viz/tests
dsh c3ab2f1ac0 viz: size the tape buffer from the file, and refuse a too long tape loudly
read_tape filled a fixed INS_SIZE buffer and stopped at the limit without saying
anything, so a longer tape ran half a program and produced a plausible wrong
answer (a 112797 character calculator tape from a 17 bit build, for instance).

read_tape_alloc now allocates from the file size, filters the instruction
characters and returns the length, so nothing is ever cut in half.  Verified the
short tapes are unaffected (the smoke checks still pass: serial R8F, -n
512 1536 512, 7E1 A).

It also found the next wall: a 97307 character tape **crashes** the machine with
0xC0000005 (access violation) even though rot8_ins_size is uint32_t -- rot8.c
still has a fixed size assumption of its own somewhere.  Until that is found and
widened, read_tape_alloc refuses anything above INS_SIZE and the CLI says so,
which is strictly better than the silent truncation.  TODO gets the rest.
2026-11-15 17:51:20 +08:00
..