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 spot the problem? I think its
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
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
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
Simon 'corecode' Schubert wrote:
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
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