Permalink
Browse files

Use copy_instructions in mach

  • Loading branch information...
1 parent 2ec6e74 commit b8cfc62fddef63d878ddd9ba4b817e8ae14013c2 @ice799 committed Apr 26, 2010
Showing with 2 additions and 1 deletion.
  1. +2 −1 ext/mach.c
View
@@ -85,7 +85,8 @@ get_dyld_stub_target(struct dyld_stub_entry *entry) {
static inline void
set_dyld_stub_target(struct dyld_stub_entry *entry, void *addr) {
- *((void**)((void*)(entry + 1) + entry->offset)) = addr;
+ void *target = (void *)(entry+1) + entry->offset;
+ copy_instructions(target, &addr, sizeof(void *));
}
static inline const char*

0 comments on commit b8cfc62

Please sign in to comment.