va_copy() problem
YONETANI Tomokazu
qhwt+dfly at les.ath.cx
Tue Nov 13 13:41:25 PST 2007
On Tue, Nov 13, 2007 at 06:41:03PM +0000, Johannes Hofmann wrote:
> Ufff, I think I've found the problem. If libc is compiled with gcc41
> it does not work. If I compile it with gcc34 it works fine.
> The snapshots on chlamydia are compiled with gcc34, that's why it
> worked there.
> Can someone please confirm that it does not work with a gcc41-compiled
> libc?
Confirmed. I also found that if you raise the second argument to
string_resize() to 10 in main() and it seems to stop crashing.
So it seems that the difference is how vsnprintf() behave when it's passed
a buffer smaller than needed? gdb shows that vsnprintf() trashes
*s when it's passed 1 as the size argument in such a case.
Cheers.
More information about the Users
mailing list