On 10/28/2011 04:39 PM, Markus Armbruster wrote:
>
>  I'm tempted to continue the thread but at the end of the day we just
>  need to make the function compile with -NDEBUG.  Using abort(3) or
Do we?

Anyone crazy^Wadventurous enough to compile with -DNDEBUG should be
capable of configure --disable-werror.

Also, I'm not really sure of the benefit of NDEBUG. For something like QEMU, hardware emulation is not going to be your bottleneck and for KVM you badly want those asserts to protect against guest-to-host escalation. If you have a really expensive check, you should wrap it inside #ifdef DEBUG.

And if you use NDEBUG because you want to live on the edge and ignore possible problems, remember there's an "assert (p != NULL)" hidden before any pointer dereference, and you cannot disable that with NDEBUG. :)

Paolo


Reply via email to