[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ast-developers
Subject:    [ast-developers] Re: [Wishlist] Another item for the ksh93v- wishlist: Asserts... / was: Re: Moving
From:       Roland Mainz <roland.mainz () nrubsig ! org>
Date:       2012-06-25 5:50:49
Message-ID: CAKAoaQnC-sJXEWzxkvSU--S2ukD67d0Re1GvBqgi4Ldc4Ace=A () mail ! gmail ! com
[Download RAW message or body]

On Mon, Jun 25, 2012 at 6:49 AM, Glenn Fowler <gsf@research.att.com> wrote:
> On Mon, 25 Jun 2012 06:39:39 +0200 Roland Mainz wrote:
>> On Mon, Jun 25, 2012 at 5:53 AM, Glenn Fowler <gsf@research.att.com> wrote:
>> [snip]
>> > it looks like the ksh buffer pool is hosed
>
>> Here is another item for the wishlist for ksh93v-: Asserts. If an
>> assert fails the whole process dumps core. I know you're not very
>> found of this idea... but for example the Solaris kernel is _full_ of
>> these asserts and if you only trip one the whole kernel creates a
>> crash dump (this is like a core dump) and reboots. IMO something like
>> that would be very very usefull for AST applications, too.
>
> we don't have asserts in active code

I know... my idea was to have a 2nd (1st is debug/non-debug) level via
asserts which guard certain assumptions in the code. The idea is to
have a compile option to enable the asserts. Default should be
"asserts compiled-in and active" for debug builds and "asserts not
compiled in" for non-debug builds... but it should be possible to
build them into non-debug builds via a #define, too. I like to get to
a point where the current Solaris kernel already is... it makes QA for
the end product much much easier.

> but you can get a core dump at the first ast diagnostic that uses error(LEVEL, ...) by
>
>        ERROR_OPTIONS=core=LEVEL ast-command ...

Erm.. but that is AFAIK a different mechanism than asserts... the idea
is really to "litter" the code with assert-like statements to catch
some kind of "silent corruptions" very early... preferably before they
cause trouble much later down the road.

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.mainz@nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 3992797
 (;O/ \/ \O;)

_______________________________________________
ast-developers mailing list
ast-developers@research.att.com
https://mailman.research.att.com/mailman/listinfo/ast-developers
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic