The guard reserves 9 bytes but the comment explained 5, which is the longest escape alone -- it did not account for the three writes after the loop (the ellipsis and the closing quote), so the next person to touch the escape table would have preserved the wrong invariant. Swept every length to 1300 against \x01, a quote, a backslash and 'a' under ASan with a red zone past the buffer: no write past 1024, worst output 1021. Correct, but by three bytes, which is exactly why the reserve is now written down as the four things it is spent on. Nothing exercised truncation -- the longest nested string in the fixture was 18 bytes -- so println.flan now prints a struct with an 1100-byte string field, and the expected output spells the surviving count out as a number so a change to the buffer shows up as one.
Description
Languages
OCaml
67.2%
Emacs Lisp
15.2%
C
10.4%
HTML
2.9%
Standard ML
2.8%
Other
1.5%