diff options
-rw-r--r-- | wasm2c/wasm-rt-impl.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/wasm2c/wasm-rt-impl.c b/wasm2c/wasm-rt-impl.c index 197c53f8..72e4d66e 100644 --- a/wasm2c/wasm-rt-impl.c +++ b/wasm2c/wasm-rt-impl.c @@ -188,7 +188,7 @@ static bool os_has_altstack_installed() { static void os_allocate_and_install_altstack(void) { /* verify altstack not already allocated */ assert(!g_alt_stack && - "wasm-rt error: tried to re-allocate thread-local alternate stack\n"); + "wasm-rt error: tried to re-allocate thread-local alternate stack"); /* We could check and warn if an altstack is already installed, but some * sanitizers install their own altstack, so this warning would fire @@ -214,12 +214,8 @@ static void os_allocate_and_install_altstack(void) { static void os_disable_and_deallocate_altstack(void) { /* in debug build, verify altstack allocated */ -#ifndef NDEBUG - if (!g_alt_stack) { - fprintf(stderr, "wasm-rt error: alternate stack is NULL\n"); - abort(); - } -#endif + assert(g_alt_stack && + "wasm-rt error: thread-local alternate stack not allocated"); /* verify altstack was still in place */ stack_t ss; |