[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: assert() vs. return(error)

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2006-02-21 19:44:54 CET

Branko Čibej wrote:
> Christian Stork wrote:
>> On Thu, Feb 16, 2006 at 03:17:02AM +0100, Branko Čibej wrote:
>>> Furthermore it's quite likely that a bug reported against the release
>>> version can't be reproduced in the debug version.
>>
>> How can this be if assertions don't have side-effects? Are you talking
>> about timing issues? If so, tough luck. The bug needs to be debugged
>> without assert()s enabled.
>
> Even if an assert has no side effects, disabling it could expose a
> different bug, by allowing code to execute that would never have been
> reached while the assert is active.
>
> This is one of the QA nightmare scenarios:
>
> QA: Hey, we found a bug in the release bits. Here's the repro.
> Dev: Sorry, can't reproduce your error, I hit an assert as expected.

No. Dev: "Thanks for the recipe. When I do that, instead of the bad behaviour
that you observed I get an assertion failure which immediately confirms that
there is a bug and makes it relatively easy to track down."

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Feb 21 19:45:59 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.