Compiling this function, the stack allocation for buf is done as:
800087b2: 6505 lui a0, 0x1
800087b4: 22a1055b ct.cincoffset a0, sp, a0
800087b8: 8585155b ct.cincoffset a0, a0, -0x7a8
The first ct.cincoffset (which, unrelated, should be called cincaddr) takes sp out of bounds. The second brings it in, but by then the tag is cleared.