[Box Backup-dev] NDEBUG in Win32 release (was: COMMIT r279 - box/chris/win32/vc2005-compile-fixes/lib/backupclient)

Chris Wilson boxbackup-dev at fluffy.co.uk
Sun Dec 25 01:32:11 GMT 2005


Hi Ben,

> Doesn't that imply that you should be running a debug build instead?

Maybe, but:

> The memory leak code is nasty and invasive, and won't necessarily give 
> the right answers anyway.

Then I don't want it in user builds (it already caused me one problem when 
it overflowed an internal buffer).

> There's an argument for leaving assertions in, but the style I've tried 
> to follow is that an ASSERT will catch the error just before it's 
> defensively coded anyway, so it shouldn't cause a major problem.

I'd still like it to be logged on the builds my users run, even if it 
doesn't abort the program. Does your defensive coding log the error 
already? And are all assertions coded defensively?

> Users should not be running code compiled without NDEBUG, and if it's 
> desirable to keep in code which defining it removes, we should be 
> looking at changing the mechanism.

Yes, I would like exception logging with file names and line numbers in 
the builds I distribute to users, at least while I'm beta testing Box for 
Windows.

Perhaps this could be integrated with the logging changes we've been 
talking about?

Cheers, Chris.
-- 
_ ___ __     _
  / __/ / ,__(_)_  | Chris Wilson <0000 at qwirx.com> - Cambs UK |
/ (_/ ,\/ _/ /_ \ | Security/C/C++/Java/Perl/SQL/HTML Developer |
\ _/_/_/_//_/___/ | We are GNU-free your mind-and your software |




More information about the Boxbackup-dev mailing list