I carelessly passed:
to an allocator call, instead of:
and corrupted memory nicely.
What the hell would sizeof(variable+1) even mean, and why on earth would the compiler think that is anything close to valid? Both gcc and clang, each with -Wall, are completely quiet about this error!
sizeof is based on the type of the expression, which by the way is not evaluated
so 4 of 8 depending on type of st_size