Skip to main content

Module assertion_slots

Module assertion_slots 

Source
Expand description

Rich assertion slot tracking for the Antithesis-style assertion suite.

Maintains a fixed-size table of assertion slots in shared memory. Supports boolean assertions (always/sometimes/reachable/unreachable), numeric guidance assertions (with watermark tracking), and compound boolean assertions (sometimes-all with frontier tracking).

Each slot is accessed via raw pointer arithmetic on MAP_SHARED memory. The sequential fork tree (parent waits on children) means no true atomic CAS races occur — simple CAS suffices for correctness across forks.

Structs§

AssertionSlot
A single assertion tracking slot in shared memory.
AssertionSlotSnapshot
A snapshot of an assertion slot for reporting.

Enums§

AssertCmp
Comparison operator for numeric assertions.
AssertKind
The kind of assertion being tracked.

Constants§

ASSERTION_TABLE_MEM_SIZE
Total size of the assertion table memory region in bytes.
MAX_ASSERTION_SLOTS
Maximum number of tracked assertion slots.

Functions§

assertion_bool
Boolean assertion backing function.
assertion_numeric
Numeric guidance assertion backing function.
assertion_read_all
Read all allocated assertion slots from shared memory.
assertion_sometimes_all
Compound boolean assertion backing function (sometimes-all).
msg_hash
FNV-1a hash of a message string to a stable u32.