libxl: abort on memory allocation errors

Use abort() instead of just _exit() in libxl__alloc_failed(). This
is more friendly for debugging, as it will trap into debugger,
systemd-coredump will collect coredump/backtrace etc. It's much more
useful than just "libxl: FATAL ERROR: memory allocation failure (...)"
message without context where it actually failed.

Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
This commit is contained in:
Marek Marczykowski-Górecki authored and Jan Beulich committed 2022-12-13 15:23:54 +01:00
1 parent bc19af0bd4
commit 630dc3798e
1 file changed
+1 -1
+1 -1
View File
@@ -36,7 +36,7 @@ void libxl__alloc_failed(libxl_ctx *ctx, const char *func,
}
fflush(stderr);
_exit(-1);
abort();
#undef M_NSIZE
#undef M_SIZE
#undef M
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.