mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-04-14 22:51:50 +03:00
Improve the failure message upon opt_experimental_infallible_new.
This commit is contained in:
parent
70d4102f48
commit
cd5aaf308a
2 changed files with 10 additions and 4 deletions
|
|
@ -9,8 +9,8 @@
|
|||
typedef void (*abort_hook_t)(const char *message);
|
||||
bool fake_abort_called;
|
||||
void fake_abort(const char *message) {
|
||||
if (strcmp(message, "<jemalloc>: Allocation failed and "
|
||||
"opt.experimental_infallible_new is true. Aborting.\n") != 0) {
|
||||
const char *expected_start = "<jemalloc>: Allocation of size";
|
||||
if (strncmp(message, expected_start, strlen(expected_start) != 0)) {
|
||||
abort();
|
||||
}
|
||||
fake_abort_called = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue