On Wed, 7 Aug 2013 02:24:22 +0200 Roland Mainz wrote:
> Hi!

> ----

> More or less short RFE: Are there any objections of adding assertion
> code by default in libast&&co., e.g. an |AST_ASSERT(expr)| macro which
> immediatly and mercilessly calls |abort()| when the expression |expr|
> is not |true| ? It should be allowed to turn the macro into a "nop" of
> course... but the default build (debug+optimised) should have it
> enabled by default (like Solaris does during development cycles).

> The reason I'm coming up with this idea (again) is that this helped a
> _lot_ to improve the quality of the Solaris kernel+userland by making
> mistakes a la the recent "|fcleft()| returns large negative numbers"
> immediately fatal instead of letting the error condition "bleed
> through" to other subsystems. It seems libast&&ksh93 have more
> problems in this area... I'm experimenting with
> http://clang.llvm.org/docs/AddressSanitizer.html right now and the
> results look suspicious... either this "clang" feature doesn't work or
> we have a lot more problems to fix.

> Comments/rants/etc. welcome (and if the idea is OK in general I start
> crafting patches) ...

we have <debug.h> with DEBUG_ASSERT() and friends already used in kpv code

_______________________________________________
ast-developers mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-developers

Reply via email to