UTF-8 validation in x86-64: a scalar reference and an AVX2 version that checks 32 bytes per step. Every build fuzzes one against the other.
Commits on Oct 8, 2026
Commits on Sep 30, 2026
System V build
…
Under elf64 the arguments arrive in rdi and rsi, and the last block is padded in the red zone instead of the shadow space. Both files assemble for both ABIs on every build.
tsvetcommitted
Commits on Sep 15, 2026
Every case at offsets 0 to 63
…
Each sample from table 3-7 now sits behind 0 to 63 bytes of ASCII, once at the end of the input and once with 32 more bytes after it, so each one crosses a block boundary somewhere: 27 samples, 3,456 runs.
latchagentcommitted
Commits on Sep 1, 2026
ASCII fast path
…
vpmovmskb gathers the top bit of every byte. When it is zero the block is all ASCII, and the only thing that can be wrong is that the block before it ended mid-sequence. Compare the ASCII line of this build's benchmark with the one before.
tsvetcommitted
Commits on Aug 29, 2026
vzeroupper before the only ret
…
The function returned with the upper halves of ymm0-5 dirty, and legacy SSE code in the caller pays for that: a state transition on older Intel cores, a false dependency on newer ones.
latchagentcommitted
Commits on Aug 20, 2026
Stay a leaf: pad the tail in shadow space, not a stack frame
…
The push rbp / and rsp, -32 frame made utf8_valid_avx2 a frame function, and on Windows x64 a frame function needs unwind data in .pdata and .xdata. There was none, so a debugger, profiler or exception walking the stack through it would get lost. The caller's 32 bytes of shadow space hold exactly one block, so the frame can go. The function is 13 bytes shorter too.
miracommitted
Commits on Aug 12, 2026
A block may not end inside a sequence
…
All 3,418 inputs the fuzzer caught are a multiple of 32 bytes long and stop partway through a sequence: ...4D E2, ...F0 90 A9. Inside the input, the next block's tables catch a sequence cut short. At a block-aligned end there is no next block, and no padded tail either. is_incomplete now flags a block whose last three bytes start a sequence it cannot finish, and the final check ORs that in. The truncated sequences are fixed cases now, on their own and at the end of a full block.
Commits on Aug 5, 2026
Fuzz the AVX2 version against the scalar one
…
Random well-formed text up to 400 bytes, half of it damaged: a flipped bit, a cut-off end, or one byte overwritten. The scalar version is the oracle. The build is red: 3,418 of 1,000,000 inputs pass the AVX2 check and fail the scalar one. The first five are in the log.
latchagentcommitted
Commits on Aug 4, 2026
AVX2: three nibble tables and a saturating subtract
…
Keiser and Lemire's lookup algorithm, 32 bytes per step. The tables flag every illegal pair of adjacent bytes, and prev2 and prev3 minus 0x60 and 0x70 mark where a third or fourth byte has to be. The last partial block is padded with spaces in an aligned slot on the stack. Table 3-7 passes for both versions.
tsvetcommitted
Commits on Jul 27, 2026
Benchmark: 64 MiB of ASCII and 64 MiB of mixed text
…
Best of five runs each. The build runs it, so every build log carries the numbers for the machine that built it.
tsvetcommitted
Commits on Jul 20, 2026
Scalar validator with every range from table 3-7
…
One byte at a time, with each lead byte's allowed second byte spelled out: E0 needs A0..BF, ED stops at 9F before the surrogates, F0 starts at 90 and F4 ends at 8F. The tests walk the edges of the table.
tsvetcommitted