✘assert() ??

Gary E. Miller gem at rellim.com
Fri Jun 2 02:32:33 UTC 2017


Yo All!

The backtrace code almost works, but it mostly makes sense in concert
with the assert() code.

Presently NTPsec supports these 24 flavors of assert():

    ISC_REQUIRE()
    ISC_ENSURE()
    ISC_INSIST()
    ISC_INVARIANT()

    ALWAYS_REQUIRE()
    ALWAYS_INSIST()
    ALWAYS_INVARIANT()
    ALWAYS_ENSURE()

    REQUIRE()
    INSIST()
    INVARIANT()
    ENSURE()

    NTP_REQUIRE()
    NTP_INSIST()
    NTP_INVARIANT()
    NTP_ENSURE()

    DEBUG_REQUIRE()
    DEBUG_INSIST()
    DEBUG_INVARIANT()
    DEBUG_ENSURE()

Plus two bare assert()s for good measure.

In another complication, some of the macros do different things
depending on various cpp flags.

Is there reason for them to not be always on?  What is the point of
a commented out assert()?

Any reason we need more than these four?

    REQUIRE()
    INSIST()
    INVARIANT()
    ENSURE()

Or better yet, why are they not always on and all simply ASSERT()? Is
there a point to have 4 variants?

When this is untangled, the assert() code can get hooked to the
new backtrace code.  Then ntpd can have the same backtrace code we have
in python, that most people want removed...

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
	gem at rellim.com  Tel:+1 541 382 8588

	    Veritas liberabit vos. -- Quid est veritas?
    "If you can’t measure it, you can’t improve it." - Lord Kelvin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ntpsec.org/pipermail/devel/attachments/20170601/bdcc2848/attachment.bin>


More information about the devel mailing list