From 8a100eeb260aef39171b6778a3df0699615e48b8 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Fri, 15 Mar 2019 14:42:22 -0700 Subject: [PATCH] ircd::assert: Ensure x86_64 for use of trap instruction. --- ircd/assert.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ircd/assert.cc b/ircd/assert.cc index 5d458b2f6..9e81a5338 100644 --- a/ircd/assert.cc +++ b/ircd/assert.cc @@ -26,12 +26,14 @@ __assert_fail(const char *__assertion, __function, __assertion); - if(strcmp(RB_ASSERT, "trap") == 0) - __asm__ volatile ("int $3"); - - else if(strcmp(RB_ASSERT, "quit") == 0) + if(strcmp(RB_ASSERT, "quit") == 0) ircd::quit(); + #if defined(__x86_64__) + else if(strcmp(RB_ASSERT, "trap") == 0) + __asm__ volatile ("int $3"); + #endif + #if defined(HAVE_EXCEPTION) else if(strcmp(RB_ASSERT, "term") == 0) {