summaryrefslogtreecommitdiff
path: root/src/analysis/disass/rank.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2016-04-20 12:07:19 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2016-04-20 12:07:19 (GMT)
commit59f319d9a6961a7424c7b32f49aa7ac1045a1d4c (patch)
treee9d62c684dd8d8f5e141b9332994041bd2371f9a /src/analysis/disass/rank.c
parent8962a4e61411c8362d5f4be63496977164b886a8 (diff)
Protected all concurrent accesses to sources and destinations of instructions.
Diffstat (limited to 'src/analysis/disass/rank.c')
-rw-r--r--src/analysis/disass/rank.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/analysis/disass/rank.c b/src/analysis/disass/rank.c
index 9b9f29e..85d9e66 100644
--- a/src/analysis/disass/rank.c
+++ b/src/analysis/disass/rank.c
@@ -73,6 +73,8 @@ static bool rank_flow_block(GFlowBlock *block, BlockVisitOrder order, const GIns
links = g_instr_block_get_links_block(G_INSTR_BLOCK(block));
g_flow_block_get_boundary(block, NULL, &last);
+
+ g_arch_instruction_rlock_dest(last);
dcount = g_arch_instruction_get_destinations(last, &dests, &types, NULL);
for (i = 0; i < dcount; i++)
@@ -170,6 +172,8 @@ static bool rank_flow_block(GFlowBlock *block, BlockVisitOrder order, const GIns
}
+ g_arch_instruction_runlock_dest(last);
+
return true;
}