DragonFly users List (threaded) for 2007-11
DragonFly BSD
DragonFly users List (threaded) for 2007-11
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: va_copy() problem


From: YONETANI Tomokazu <qhwt+dfly@xxxxxxxxxx>
Date: Wed, 14 Nov 2007 06:36:59 +0900

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.



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]