about summary refs log tree commit diff stats
path: root/src/libtools
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2025-04-16 14:51:50 +0200
committerptitSeb <sebastien.chev@gmail.com>2025-04-16 14:51:50 +0200
commit7f569247d511e397e72b369de2315385c879e5d1 (patch)
tree4f4d46833a42bfb35038ff710abbe754119cb7aa /src/libtools
parent1ba0ea157fdde73df5c9f242c6ad4db7abddeaca (diff)
downloadbox64-7f569247d511e397e72b369de2315385c879e5d1.tar.gz
box64-7f569247d511e397e72b369de2315385c879e5d1.zip
Motsly commetic change in internal SIGILL handling
Diffstat (limited to 'src/libtools')
-rw-r--r--src/libtools/signals.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/libtools/signals.c b/src/libtools/signals.c
index b924a32f..cabcd5f4 100644
--- a/src/libtools/signals.c
+++ b/src/libtools/signals.c
@@ -1621,10 +1621,12 @@ void my_box64signalhandler(int32_t sig, siginfo_t* info, void * ucntx)
     }
     #ifdef ARCH_NOP
     if(sig==SIGILL) {
-        db = FindDynablockFromNativeAddress(pc);
-        if(db)
-            x64pc = getX64Address(db, (uintptr_t)pc);   // this will be incorect in the case of the callret!
-        db_searched = 1;
+        if(!db_searched) {
+            db = FindDynablockFromNativeAddress(pc);
+            if(db)
+                x64pc = getX64Address(db, (uintptr_t)pc);   // this will be incorect in the case of the callret!
+            db_searched = 1;
+        }
         if(db && db->callret_size) {
             int is_callrets = 0;
             int type_callret = 0;