From e7820ac63bb0f4f3dce1beb763bd70a858c47131 Mon Sep 17 00:00:00 2001 From: Boris Batteux Date: Thu, 18 Feb 2021 15:28:21 +0100 Subject: [PATCH] combine_blocks already calls remove_empty_blocks Calling combine_blocks twice can make IDA crash sometimes --- d810/cfg_utils.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/d810/cfg_utils.py b/d810/cfg_utils.py index 4f31f50..78d6a62 100644 --- a/d810/cfg_utils.py +++ b/d810/cfg_utils.py @@ -443,12 +443,8 @@ def mba_deep_cleaning(mba: mbl_array_t) -> int: # Doing this optimization before MMAT_CALLS may create blocks with call instruction (not last instruction) # IDA does like that and will raise a 50864 error return 0 - mba.remove_empty_blocks() mba.combine_blocks() nb_change = mba_remove_simple_goto_blocks(mba) - if nb_change > 0: - mba.remove_empty_blocks() - mba.combine_blocks() return nb_change