| AWARE [SYSTEMS] | Imaging expertise for the Delphi developer | |||||||
![]() |
TIFF and LibTiff Mailing List Archive | |||||||
LibTiff Mailing List
TIFF and LibTiff Mailing List Archive Contact
The TIFF Mailing List Homepage |
Thread2009.02.05 19:04 "Re: assertions, and building with DEBUG/NDEBUG", by Edward Lam> So my question is, is it normal for people building for production > purposes to build with NDEBUG defined? Yes. Visual Studio does this by default for release builds. -Edward Frank Warmerdam wrote: > Folks, > > Tavis Ormandy has reported some problems with corrupt tiff files that > trigger assertions() in libtiff. > > http://bugzilla.maptools.org/show_bug.cgi?id=1995 > > It appears these assertions are being used to call to attention > problems in these files for developers, and are intended to be > compiled out in production software. > > On investigation I see that NDEBUG needs to be defined to disable > assertions. Previously I had assumed that it was sufficient to not > define DEBUG but that does not appear to be the case. > > So my question is, is it normal for people building for production > purposes to build with NDEBUG defined? > > I found I had to set CFLAGS=-DNDEBUG before configuring to disable > asserts. I also notice that the windows makefiles make no mention of > DEBUG or NDEBUG. > > I am contemplating modifying tiffiop.h to explicitly define NDEBUG if > DEBUG is not defined, before including assert.h. This would mean > that assertions are compiled out by default, and only included if > DEBUG is explicitly requested. I would also change Makefile.vc to > define DEBUG for the debug build case. > > Does anyone have thoughts on a more appropriate approach? > > Best regards, |
|||||||