<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/distcc-git.git/src/va_copy.h, branch python3</title>
<subtitle>github.com: distcc/distcc.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/distcc-git.git/'/>
<entry>
<title>Fix a bug that caused "make check" to fail: MissingCompiler_Case</title>
<updated>2008-07-29T22:17:30+00:00</updated>
<author>
<name>fergus.henderson</name>
<email>fergushenderson@users.noreply.github.com</email>
</author>
<published>2008-07-29T22:17:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/distcc-git.git/commit/?id=a59ffb549e7e423e48b46726de6563c96646e6b2'/>
<id>a59ffb549e7e423e48b46726de6563c96646e6b2</id>
<content type='text'>
was reporting an unexpected exit status: 139 instead of 110.
This was caused by a seg fault in distccd, deep in the bowels of
vsnprintf(), which appears to be due to calling vsnprintf() twice
on the same va_list.  The fix is to use va_copy() in src/trace.c.

Of course it's never quite as easy as that.  va_copy() exists
only in C99, not in C89.  Some implementations have __va_copy()
but not va_copy().  So we need to autoconf it.  There was
already an autoconf test for this, but only for __va_copy.
I've moved the code which defined VA_COPY from snprintf.c to
a new header file va_copy.h, and added a VA_COPY_END macro.

Also, fix another bug that I noticed at the same time:
snprintf.c was using va_copy(), but was not matching each
call to va_copy with a corresponding call to va_end(),
as required by the C99 standard.

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
was reporting an unexpected exit status: 139 instead of 110.
This was caused by a seg fault in distccd, deep in the bowels of
vsnprintf(), which appears to be due to calling vsnprintf() twice
on the same va_list.  The fix is to use va_copy() in src/trace.c.

Of course it's never quite as easy as that.  va_copy() exists
only in C99, not in C89.  Some implementations have __va_copy()
but not va_copy().  So we need to autoconf it.  There was
already an autoconf test for this, but only for __va_copy.
I've moved the code which defined VA_COPY from snprintf.c to
a new header file va_copy.h, and added a VA_COPY_END macro.

Also, fix another bug that I noticed at the same time:
snprintf.c was using va_copy(), but was not matching each
call to va_copy with a corresponding call to va_end(),
as required by the C99 standard.

</pre>
</div>
</content>
</entry>
</feed>
