X-Authentication-Warning: acp3bf.physik.rwth-aachen.de: broeker owned process doing -bs Date: Tue, 8 May 2001 12:08:17 +0200 (MET DST) From: Hans-Bernhard Broeker X-Sender: broeker AT acp3bf To: djgpp-workers AT delorie DOT com Subject: Re: snprintf? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Tue, 8 May 2001, Eli Zaretskii wrote: [...] > didn't cope well with this (setting a pointer to NULL is looking for > SIGSEGV's ;-), and IIRC the test harness didn't test all of the > possible cases (I forget the details). The case of n == 0 is very > important for snprintf, so it must be rock-solid. As a reminder, let me point out that we do have tools to check whether a test case exercised all of the special cases in a given function: that's exactly what gcov is for. E.g. compiling snprintf.c separately from the libc, with -ftest-coverage -fprofile-arcs turned on, and doing the test run with that .o file in use, you can then run gcov -b -f snprintf.c and scan the resulting snprintf.c.gcov file for occurences of lines where the execution count is '###########' --> never executed. Also check for branches never executed. -- Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) Even if all the snow were burnt, ashes would remain.