obfsproxy is too gentle during assertion failures
This is part of #3613 (closed) that never got fixed:
/** Assertion checking. We don't ever compile assertions out, and we
want precise control over the error messages, so we use our own
assertion macros. */
#define obfs_assert(expr) \
do { \
if (!(expr)) \
log_error("assertion failure at %s:%d: %s", \
__FILE__, __LINE__, #expr); \
} while (0)
#define obfs_abort() \
do { \
log_error("aborted at %s:%d", __FILE__, __LINE__); \
} while (0)
and log_error()
is:
/** Public function for logging an error and then exiting. */
void
log_error(const char *format, ...)
{
va_list ap;
va_start(ap,format);
logv(LOG_SEV_ERR, format, ap);
va_end(ap);
exit(1);
}
This won't dump cores or backtraces back to the user.