diff options
author | comex | 2015-02-23 00:41:29 -0500 |
---|---|---|
committer | comex | 2015-02-23 00:54:13 -0500 |
commit | b63f1dff9dc736f7fa66f04976436f1f3fe2ac5d (patch) | |
tree | db70eb338a0107fdc70992ea2522fd03f2ecf32e /lib/substitute.h | |
parent | fix some i386 stuff (diff) | |
download | substitute-b63f1dff9dc736f7fa66f04976436f1f3fe2ac5d.tar.gz |
Ban calls within transform regions in threadsafe mode.
Diffstat (limited to 'lib/substitute.h')
-rw-r--r-- | lib/substitute.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/substitute.h b/lib/substitute.h index 2045c3d..d8b9fd0 100644 --- a/lib/substitute.h +++ b/lib/substitute.h @@ -29,6 +29,14 @@ enum { * updated to handle that case properly */ SUBSTITUTE_ERR_FUNC_BAD_INSN_AT_START, + /* substitute_hook_functions: can't patch a function because one of the + * instructions within the patch region (other than the last instruction) + * is a call - meaning that a return address within the region (i.e. about + * to point to clobbered code) could be on some thread's stack, where we + * can't easily find and patch it. This check is skipped if + * SUBSTITUTE_NO_THREAD_SAFETY is set. */ + SUBSTITUTE_ERR_FUNC_CALLS_AT_START, + /* substitute_hook_functions: can't patch a function because the (somewhat * cursory) jump analysis found a jump later in the function to within the * patch region at the beginning */ |