about summary refs log tree commit diff stats
path: root/miasm2/core/asmbloc.py
diff options
context:
space:
mode:
Diffstat (limited to 'miasm2/core/asmbloc.py')
-rw-r--r--miasm2/core/asmbloc.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/miasm2/core/asmbloc.py b/miasm2/core/asmbloc.py
index e4f1db68..96c2f4ec 100644
--- a/miasm2/core/asmbloc.py
+++ b/miasm2/core/asmbloc.py
@@ -946,6 +946,14 @@ class AsmCFG(DiGraph):
                     log_asmbloc.error("Cannot split %x!!", off)
                     continue
 
+                # Remove pending from cur_block
+                # Links from new_b will be generated in rebuild_edges
+                for dst in new_b.bto:
+                    if dst.label not in self.pendings:
+                        continue
+                    self.pendings[dst.label] = set(pending for pending in self.pendings[dst.label]
+                                                   if pending.waiter != cur_block)
+
                 # The new block destinations may need to be disassembled
                 if dis_block_callback:
                     offsets_to_dis = set(constraint.label.offset