benilla-re systems structs docs

WardenBuffer

struct · warden · 8 bytes

Meaning
Holds a length and a data pointer; the record the module cache keeps
Confidence
verified, proof one
Finding
warden/cache#the-cache-record

Finding: The cache record in warden: the module cache

A WardenBuffer is stored as a dword length and then the bytes one at a time. The reader allocates the length and fills it byte by byte. A reader given a store that holds fewer than four bytes writes no length, and the length it uses is the store's own address, read from the slot that held the argument. A length longer than the rest of the store leaves the bytes past the end as the allocator gave them.

The derivation is in the doc.

Fields 2

offsetsizetypenamemeaningconfidencefinding
0x00004uint32_tm_sizeHolds the length of the dataverified, proof onewarden/cache#the-cache-record
0x00044uint8_t *m_dataHolds the data, a copy the buffer owns, or nullverified, proof onewarden/cache#the-cache-record