Skip to content

taurus v0.11.3

Choose a tag to compare

@github-actions github-actions released this 10 Aug 11:59
· 14 commits to main since this release

Fix — benchmark-ips segfault with 15,000+ alive documents (#261)

direct_parse used a shared thread-local overflow hash table for
compact pointer encoding of next_sibling and attribute edges.
Under benchmark-ips (which keeps every return value alive), the
table accumulated entries from 15,000+ simultaneously-alive
documents. Combined with malloc address reuse, this caused
cross-document pointer corruption and a segfault in
taurus_node_freeze.

Three-part fix (all in direct_parse.c):

  1. Overflow-table-free wiring: all compact pointer edges
    (parent, child, sibling, attribute) now use direct offset
    arithmetic. direct_parse never touches the thread-local
    overflow state — it's fully self-contained.

  2. Contiguous elem+attr allocation: elem_block and
    attr_block are now ONE combined pool_alloc call. Offsets
    between elements and attributes are bounded by the allocation
    size (<4MB), always fitting in int32.

  3. Right-sized pool pages: page_size is set to
    elem_bytes + attr_bytes + text_headroom (capped at 4MB).
    This keeps the bulk allocation and text/comment/CDATA nodes
    on the same pool page, within int32 offset range.

Verified: 15,000 simultaneously-alive 38KB documents parsed,
child_count-verified, and freed — zero crashes, zero corruption
(both plain and ASAN).