DragonFly users List (threaded) for 2007-11
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
Re: va_copy() problem
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]