Re: va_copy() problem

2007-11-29 Thread Johannes Hofmann
On Wed, Nov 28, 2007 at 09:44:28AM +0100, Simon 'corecode' Schubert wrote: Johannes Hofmann wrote: Sepherosa Ziehau [EMAIL PROTECTED] wrote: Could you try compiling your program with -fno-builtin-vsnprintf? This makes no difference here, also it does not matter whether I compile the program

Re: va_copy() problem

2007-11-28 Thread Simon 'corecode' Schubert
Johannes Hofmann wrote: Sepherosa Ziehau [EMAIL PROTECTED] wrote: Could you try compiling your program with -fno-builtin-vsnprintf? This makes no difference here, also it does not matter whether I compile the program with gcc34 or gcc41. Did this ever get resolved? cheers simon -- Serve

Re: va_copy() problem

2007-11-28 Thread Sepherosa Ziehau
On Nov 28, 2007 4:44 PM, Simon 'corecode' Schubert [EMAIL PROTECTED] wrote: Johannes Hofmann wrote: Sepherosa Ziehau [EMAIL PROTECTED] wrote: Could you try compiling your program with -fno-builtin-vsnprintf? This makes no difference here, also it does not matter whether I compile the

Re: va_copy() problem

2007-11-14 Thread Johannes Hofmann
Sepherosa Ziehau [EMAIL PROTECTED] wrote: Could you try compiling your program with -fno-builtin-vsnprintf? This makes no difference here, also it does not matter whether I compile the program with gcc34 or gcc41. Best Regards, Johannes Best Regards, sephe

Re: va_copy() problem

2007-11-13 Thread Joerg Sonnenberger
On Mon, Nov 12, 2007 at 08:53:46PM +, Johannes Hofmann wrote: Joerg Sonnenberger [EMAIL PROTECTED] wrote: On Mon, Nov 12, 2007 at 06:58:30PM +, Johannes Hofmann wrote: va_copy(va1, va); n = vsnprintf(s-str + s-len, s-size - s-len, format, va);

Re: va_copy() problem

2007-11-13 Thread Johannes Hofmann
Joerg Sonnenberger [EMAIL PROTECTED] wrote: On Mon, Nov 12, 2007 at 08:53:46PM +, Johannes Hofmann wrote: Joerg Sonnenberger [EMAIL PROTECTED] wrote: On Mon, Nov 12, 2007 at 06:58:30PM +, Johannes Hofmann wrote: va_copy(va1, va); n = vsnprintf(s-str +

Re: va_copy() problem

2007-11-13 Thread Johannes Hofmann
Johannes Hofmann [EMAIL PROTECTED] wrote: Joerg Sonnenberger [EMAIL PROTECTED] wrote: On Mon, Nov 12, 2007 at 08:53:46PM +, Johannes Hofmann wrote: Joerg Sonnenberger [EMAIL PROTECTED] wrote: On Mon, Nov 12, 2007 at 06:58:30PM +, Johannes Hofmann wrote: va_copy(va1,

Re: va_copy() problem

2007-11-13 Thread YONETANI Tomokazu
On Tue, Nov 13, 2007 at 06:41:03PM +, 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

Re: va_copy() problem

2007-11-13 Thread Sepherosa Ziehau
On 13 Nov 2007 18:41:03 GMT, Johannes Hofmann [EMAIL PROTECTED] wrote: Johannes Hofmann [EMAIL PROTECTED] wrote: Joerg Sonnenberger [EMAIL PROTECTED] wrote: On Mon, Nov 12, 2007 at 08:53:46PM +, Johannes Hofmann wrote: Joerg Sonnenberger [EMAIL PROTECTED] wrote: On Mon, Nov 12, 2007

gcc update (was: Re: va_copy() problem)

2007-11-12 Thread Simon 'corecode' Schubert
Johannes Hofmann wrote: Hello, I see crashes with a string handling library on DragonFly. The problem can be reduced to the test program below. It crashes on DragonFly when compiled with gcc -O2 -o foo foo.c. Without -O2 it runs fine. No problems on Linux with or without -O2. Can anyone

Re: va_copy() problem

2007-11-12 Thread Joerg Sonnenberger
On Mon, Nov 12, 2007 at 06:58:30PM +, Johannes Hofmann wrote: va_copy(va1, va); n = vsnprintf(s-str + s-len, s-size - s-len, format, va); va_end(va1); va - va1 in the call to vsnprintf. Also consider using vasprintf. Joerg

Re: gcc update (was: Re: va_copy() problem)

2007-11-12 Thread Joerg Sonnenberger
On Mon, Nov 12, 2007 at 09:27:17PM +0100, Simon 'corecode' Schubert wrote: No, the problem is that gcc uses %ebx after a function call, which it is not allowed to do: It is allowed to. From the i386 ABI: If necessary, a function saves the values of %edi, %esi, and %ebx in the positions shown

Re: va_copy() problem

2007-11-12 Thread Johannes Hofmann
Joerg Sonnenberger [EMAIL PROTECTED] wrote: On Mon, Nov 12, 2007 at 06:58:30PM +, Johannes Hofmann wrote: va_copy(va1, va); n = vsnprintf(s-str + s-len, s-size - s-len, format, va); va_end(va1); va - va1 in the call to vsnprintf. Also consider