[Swan-dev] lsw_abort => passert
Andrew Cagney
andrew.cagney at gmail.com
Mon Mar 20 01:04:31 UTC 2017
On 19 March 2017 at 09:15, D. Hugh Redelmeier <hugh at mimosa.com> wrote:
> | New commits:
> | commit 43a57bccf46d83b69391805b4f1528c3ea9ba658
> | Author: Andrew Cagney <cagney at gnu.org>
> | Date: Fri Mar 10 15:57:55 2017 -0500
> |
> | include: delete lsw_abort(); use passert() instead
> |
> | They end up in the same place, and passert() provides more
> | information. This also means that the only references to __FILE__
> | are in passert.h.
>
> Did you check that the very early calls to lsw_abort can safely be
> replaced by passerts? These are the ones in plutomain.c. (I have
> not.) Logging may not be initialized.
Only in the sense that I ran the testsuite.
> Of course lsw_abort did logging too. But when I wrote those calls,
> they were calls to abort().
Right, for pluto, the old code path was:
libreswan_loglog("ABORT: ....")
abort()
while the new code path is:
libreswan_loglog("ASSERTION FAILED: ..."
final_breath = TRUE;
libreswan_loglog("ABORT: ....")
abort()
so we're no worse (final breath seems to increase the odds that
something gets out).
(Hmm, those two log lines can be merged; along with the two
implementations of libreswan_passert_fail()).
> Logging, if it works, is definitely a good idea.
> _______________________________________________
> Swan-dev mailing list
> Swan-dev at lists.libreswan.org
> https://lists.libreswan.org/mailman/listinfo/swan-dev
More information about the Swan-dev
mailing list