< Previous by Date Date Index Next by Date >
< Previous in Thread Thread Index Next in Thread >

Re: [reSIProcate] "opt" builds


Byron Campen wrote:
I'm not sure why this is. I imagine this was done before we had a gopt build, or maybe someone wanted to release testing binaries for a product based on resip (no symbols, but leave the asserts in).

Does anyone object to uncommenting these flags? Should we try for a more flexible approach (another configure option)?

In terms of the flags themselves, they probably shouldn't be present in production builds -- the assert()s themselves technically have a tiny performance penalty (because of the compares and branches), but it's probably not measurable.

On the other hand, it's not going to *fix* anything. The assert() statements are present to enforce the contract between the application and the library. If an assert() is halting the process, it's because the application using the stack has a bug in it. The assert() should help catch the bug earlier rather than later.

In other words: simply adding -DNDEBUG to the compile *won't* *fix* the problems David and Sunitha are having; it will just make them more inscrutable and harder to track down.

/a



Best regards,
Byron Campen

I am running into this same issue. Is there a specific reason the asserts
are not compiled out in OPT build?

Thanks,

David

-----Original Message-----
From: resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxxx
[mailto:resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxxx] On Behalf Of Sunitha
Beeram
Sent: Wednesday, September 12, 2007 2:31 PM
To: resiprocate-devel@xxxxxxxxxxxxxxxxxxxx
Subject: [reSIProcate] "opt" builds

Hi,

  We have been running resiprocate built in the opt mode
and have run into crashes caused by some assertions. I
was expecting that assertions will be turned off in
non-debug modes. The makefile has explicitly commented
out the NDEBUG flag in the opt mode :

Makefile.osarch:
    ifeq ($(VOCAL_COMPILE_TYPE),opt)
    CXXFLAGS += $(OPTFLAGS) #-DNDEBUG
    CFLAGS += $(OPTFLAGS) #-DNDEBUG
    Endif


I was wondering if I could enable these back for the opt
mode. Should I use other modes to compile resiprocate so
it can be used in 'releases'?

Thanks,
Sunitha.
_______________________________________________
resiprocate-devel mailing list
resiprocate-devel@xxxxxxxxxxxxxxxxxxxx
https://list.resiprocate.org/mailman/listinfo/resiprocate-devel

_______________________________________________
resiprocate-devel mailing list
resiprocate-devel@xxxxxxxxxxxxxxx
https://list.resiprocate.org/mailman/listinfo/resiprocate-devel

------------------------------------------------------------------------

_______________________________________________
resiprocate-devel mailing list
resiprocate-devel@xxxxxxxxxxxxxxx
https://list.resiprocate.org/mailman/listinfo/resiprocate-devel