* corvid <corvid@lavabit.com> wrote:
Does using %d or casting the length to a long change anything?
Yes, either one resolves the issue. :)
It doesn't seem like adding a ptr arg should be able to do anything to alignment, but then I don't know what goes on in the bowels of the varargs stuff.
It looks like the alignment was probably off all along, and adding a parameter just revealed an old bug. I found that simply adding a "%s" to the format string, with an empty "" as its parameter, was enough to trigger the problem. More generally, I found that it works if I use an even number of variables in format string, but it fails with an odd number. So, I think the compiler is probably padding something and the "%ld" gets the extra zero bits it needs from the padding. -- Scott