mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-24 01:27:19 +03:00
Avoid abort() in test/integration/cpp/infallible_new_true.
Allow setting the safety check abort hook through mallctl, which avoids abort() and core dumps.
This commit is contained in:
parent
9a242f16d9
commit
391bad4b95
4 changed files with 82 additions and 49 deletions
|
|
@ -4,8 +4,11 @@
|
|||
void safety_check_fail_sized_dealloc(bool current_dealloc, const void *ptr,
|
||||
size_t true_size, size_t input_size);
|
||||
void safety_check_fail(const char *format, ...);
|
||||
|
||||
typedef void (*safety_check_abort_hook_t)(const char *message);
|
||||
|
||||
/* Can set to NULL for a default. */
|
||||
void safety_check_set_abort(void (*abort_fn)(const char *));
|
||||
void safety_check_set_abort(safety_check_abort_hook_t abort_fn);
|
||||
|
||||
JEMALLOC_ALWAYS_INLINE void
|
||||
safety_check_set_redzone(void *ptr, size_t usize, size_t bumped_usize) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue