Low: libcrmcommon: Avoid dumping core in pcmk__mem_assert()
...as well as related functions pcmkassert_alloc_as() and
pcmkstr_copy_as(). The latter two would be macros that call
pcmk__mem_assert(), except that they need to return values, so they're
not macro-friendly.
They were never supposed to dump core, but the arguments to crm_abort()
are counterintuitive and we made a mistake.
Anything that calls abort() will dump core. crm_abort(..., FALSE, TRUE)
logs an assertion error message without calling abort() (and without
exiting). So we call crm_exit(CRM_EX_OSERR) afterward.
crm_abort(..., FALSE, TRUE) behaves similarly to CRM_LOG_ASSERT(). The
differences are that CRM_LOG_ASSERT() may dump core when tracing and
that CRM_LOG_ASSERT() stringifies the test expression instead of using
"Out of memory".
Also update affected unit tests. We no longer abort on allocation
failure, so the process doesn't get killed with SIGABRT, and
pcmk__assert_asserts() no longer passes.
Signed-off-by: Reid Wahl <nrwahl@protonmail.com>