summaryrefslogtreecommitdiff
path: root/plugins/libcsem
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 /plugins/libcsem
parent8962a4e61411c8362d5f4be63496977164b886a8 (diff)
Protected all concurrent accesses to sources and destinations of instructions.
Diffstat (limited to 'plugins/libcsem')
-rw-r--r--plugins/libcsem/exit.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/libcsem/exit.c b/plugins/libcsem/exit.c
index 1bb4edd..aa3ca18 100644
--- a/plugins/libcsem/exit.c
+++ b/plugins/libcsem/exit.c
@@ -68,6 +68,7 @@ static void mark_one_kind_of_exit_as_return(const GLoadedBinary *binary, const c
instr = g_arch_processor_find_instr_by_address(proc, get_mrange_addr(range));
+ g_arch_instruction_rlock_src(instr);
count = g_arch_instruction_get_sources(instr, &sources, &types);
for (i = 0; i < count; i++)
@@ -78,6 +79,8 @@ static void mark_one_kind_of_exit_as_return(const GLoadedBinary *binary, const c
}
+ g_arch_instruction_runlock_src(instr);
+
g_object_unref(G_OBJECT(proc));
mokoear_done_with_sym: