benilla-re systems structs docs

s_vsnoprintfPushCases

global · storm

Address
0x669a90 · 20 bytes, up to 0x669aa3
Type
void *[5]
Meaning
Holds the five cases that push an argument by kind to _snprintf in 0x6697d0's third pass
Confidence
verified, proof one
Finding
storm/printf#ordered-conversions

Finding: Ordered conversions in storm: printf

vsnoprintf(dest, size, fmt, va) makes three passes. The first records each % spec and, for one taking an argument, stores its kind at its index: N − 1 after %N$, else one past the previous spec's, so a plain spec after %2$s reads argument 3. The last spec naming an index decides its kind. The second reads the arguments from index 0 to the highest named, by kind: 4 bytes for an integer or a pointer, 8 for a long long or a double, 4 for an index no spec names. The third copies the text and hands each spec to _snprintf with its argument, so a repeated index prints one value twice.

The derivation is in the doc.