Subject: Re: [PATCH 1/5] strbuf API additions and enhancements.

From: Jeff King <[email-masked]>
Date: Thu, 20 Sep 2007 12:10:07 -0400

On Thu, Sep 20, 2007 at 10:20:29AM +0300, Kalle Olavi Niemitalo wrote:

> Normative text in 7.15p3 confirms this: "The object ap may be
> passed as an argument to another function; if that function
> invokes the va_arg macro with parameter ap, the value of ap in
> the calling function is indeterminate and shall be passed to the
> va_end macro prior to any further reference to ap."
> 
> Therefore va_copy is needed here, at least in principle.

Not just in principle; a few months ago, I ran afoul of the same issue
using gcc + glibc6, so it is a real problem for our target platforms
(sorry, I don't have a test case anymore, but I recall getting
undefined-ish behavior from my print statements).

-Peff