Archived
LiLiCorr's correlator gathers each sequence's context state by the row the advance pass wrote into h_arow (RadBatch::anchor_rows), and the gather validates the index plane in shape, not values: an index of -1 reaches one int32 before the context buffer and reads off the end of a device allocation. The reset that opens a build filled the plane with -1 -- honest for a host reader, poison for an index -- so a row that reached the query pass without advancing, in any path that skips the advance, gathered out of bounds instead of gathering a wrong row. The sentinel becomes row 0: always in range, and a row that really did skip its advance reads an anchor that fails acceptance and is discarded, which is the same outcome with no fault and no neighbour's state read.