mirror of
https://github.com/microsoft/mimalloc.git
synced 2025-08-23 15:54:47 +03:00
mark assert_fail as cold and noreturn; move assert to internal.h (see issue #1091, and python/cpython#134586)
This commit is contained in:
parent
3e32b4c385
commit
715acc0329
3 changed files with 69 additions and 48 deletions
|
@ -525,7 +525,7 @@ void _mi_warning_message(const char* fmt, ...) {
|
|||
|
||||
|
||||
#if MI_DEBUG
|
||||
void _mi_assert_fail(const char* assertion, const char* fname, unsigned line, const char* func ) {
|
||||
mi_decl_noreturn mi_decl_cold void _mi_assert_fail(const char* assertion, const char* fname, unsigned line, const char* func ) mi_attr_noexcept {
|
||||
_mi_fprintf(NULL, NULL, "mimalloc: assertion failed: at \"%s\":%u, %s\n assertion: \"%s\"\n", fname, line, (func==NULL?"":func), assertion);
|
||||
abort();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue