From b45415c5ff2b4087c4e3091a6ef7dc3f25eb3940 Mon Sep 17 00:00:00 2001 From: Duc Nguyen <106774416+ducnguyen-sb@users.noreply.github.com> Date: Tue, 12 Mar 2024 12:49:19 -0400 Subject: [PATCH] Use `abort()` instead of exit to get the trace log. (#1728) --- src/common/common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/common.c b/src/common/common.c index 1146f5c45..904b91519 100644 --- a/src/common/common.c +++ b/src/common/common.c @@ -275,7 +275,7 @@ void *OQS_MEM_checked_malloc(size_t len) { void *ptr = malloc(len); if (ptr == NULL) { fprintf(stderr, "Memory allocation failed\n"); - exit(EXIT_FAILURE); + abort(); } return ptr; @@ -285,7 +285,7 @@ void *OQS_MEM_checked_aligned_alloc(size_t alignment, size_t size) { void *ptr = OQS_MEM_aligned_alloc(alignment, size); if (ptr == NULL) { fprintf(stderr, "Memory allocation failed\n"); - exit(EXIT_FAILURE); + abort(); } return ptr;