Files
tbol-toolchain/shared/bytecode
Phillip Heller 4436cfcfd6 compiler: fix MAKE_FORMAT mode-byte buffer overflow
- gen_make_format's extra-mode-byte buffer was uint8_t[8], but a format spec needs ceil((3*fields+1-8)/8) mode bytes - 9 once the operand count reaches 79 (>= 24 fields). With an extended-index destination forcing complex encoding, the write and emit both indexed extra_modes[8+], a stack-buffer-overflow (ASan/UBSan confirmed at codegen_verbs.c:389) whose garbage byte became a phantom mode byte and desynced the operand stream (bogus immediate + spurious BREAK on disassembly).
- Size the buffer for the real maximum: the count byte is a uint8_t, so field_count <= 255 -> total_operands <= 766 -> at most 95 extra mode bytes. Fix the symmetric latent cap in the decoder (mode_bytes[32] -> 96).
- Resolves the desync bytes in ceo_game FGCGHFHT (51 operands, dest RDA201); those offsets now match the shipped object. Add positive test mkfmt_ext_dest_many (extended dest + 26 fields).
2026-08-12 22:18:36 -06:00
..
2026-06-21 11:34:08 -06:00
2026-06-21 11:34:08 -06:00
2026-06-21 11:34:08 -06:00
2026-06-21 11:34:08 -06:00
2026-06-21 11:34:08 -06:00
2026-06-21 11:34:08 -06:00
2026-06-21 11:34:08 -06:00
2026-06-21 11:34:08 -06:00
2026-06-21 11:34:08 -06:00