From 36404845f449d142a1f9f1e0079eb33acacba836 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 153144fb3a..49625e9ad1 100644 --- a/src/common/common.c +++ b/src/common/common.c @@ -279,7 +279,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; @@ -289,7 +289,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;