Safety checks: Indirect through a function.

This will let us share code on failure pathways.pathways
This commit is contained in:
David Goldblatt 2019-03-20 13:06:53 -07:00 committed by David Goldblatt
parent f95a88fcd9
commit b92c9a1a81
4 changed files with 20 additions and 1 deletions

11
src/safety_check.c Normal file
View file

@ -0,0 +1,11 @@
#include "jemalloc/internal/jemalloc_preamble.h"
#include "jemalloc/internal/jemalloc_internal_includes.h"
void safety_check_fail(const char *format, ...) {
va_list ap;
va_start(ap, format);
malloc_vcprintf(NULL, NULL, format, ap);
va_end(ap);
abort();
}