diff options
author | comex | 2015-02-18 02:22:36 -0500 |
---|---|---|
committer | comex | 2015-02-18 02:22:36 -0500 |
commit | 7c26a1964d2d2e54f87d9c42735f6c99b546abd4 (patch) | |
tree | f50838e492aa101a4d87e6ef01d1dc2611f32f97 /lib/darwin/substrate-compat.c | |
parent | more fixes (diff) | |
download | substitute-7c26a1964d2d2e54f87d9c42735f6c99b546abd4.tar.gz |
Fix hook-function:
- Thread stoppage is now complemented by sigaction to catch injected
threads (sigaction is not used exclusively because the rest of the
program could be trying to use sigaction itself in the meantime - this
is a real thing, ask Dolphin)
- mprotect is no longer used due to max_protection possibly getting in
the way; instead, a copy is created and mapped onto the original.
Diffstat (limited to 'lib/darwin/substrate-compat.c')
-rw-r--r-- | lib/darwin/substrate-compat.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/darwin/substrate-compat.c b/lib/darwin/substrate-compat.c index 2746795..2cdcf6f 100644 --- a/lib/darwin/substrate-compat.c +++ b/lib/darwin/substrate-compat.c @@ -43,7 +43,7 @@ EXPORT void SubHookFunction(void *symbol, void *replace, void **result) __asm__("SubHookFunction"); void SubHookFunction(void *symbol, void *replace, void **result) { struct substitute_function_hook hook = {symbol, replace, result}; - int ret = substitute_hook_functions(&hook, 1, SUBSTITUTE_DONT_STOP_THREADS); + int ret = substitute_hook_functions(&hook, 1, SUBSTITUTE_NO_THREAD_SAFETY); if (ret) { panic("SubHookFunction: substitute_hook_functions returned %s\n", substitute_strerror(ret)); |