aboutsummaryrefslogtreecommitdiff
path: root/lib/hook-functions.c
diff options
context:
space:
mode:
authorcomex2015-02-23 00:41:29 -0500
committercomex2015-02-23 00:54:13 -0500
commitb63f1dff9dc736f7fa66f04976436f1f3fe2ac5d (patch)
treedb70eb338a0107fdc70992ea2522fd03f2ecf32e /lib/hook-functions.c
parentfix some i386 stuff (diff)
downloadsubstitute-b63f1dff9dc736f7fa66f04976436f1f3fe2ac5d.tar.gz
Ban calls within transform regions in threadsafe mode.
Diffstat (limited to 'lib/hook-functions.c')
-rw-r--r--lib/hook-functions.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/hook-functions.c b/lib/hook-functions.c
index faadd82..6d53a0d 100644
--- a/lib/hook-functions.c
+++ b/lib/hook-functions.c
@@ -207,7 +207,8 @@ int substitute_hook_functions(const struct substitute_function_hook *hooks,
* ending make_jump_patch call) */
if ((ret = transform_dis_main(code, &trampoline_ptr, pc_patch_start,
&pc_patch_end, (uintptr_t) trampoline_ptr,
- &arch, hi->offset_by_pcdiff)))
+ &arch, hi->offset_by_pcdiff,
+ thread_safe ? TRANSFORM_DIS_BAN_CALLS : 0)))
goto end;
uintptr_t dpc = pc_patch_end;