# HG changeset patch # User Michael Pavone # Date 1481599282 28800 # Node ID fc125af5e4f18583b8fd8bc78e45a4485d3854c5 # Parent cacbd3f18f03aff27b834381181d5a192c1d38fd Fix to the fix of handling of self modifying code. Was ORing the base address with the wrong register before calling the modified code handler diff -r cacbd3f18f03 -r fc125af5e4f1 backend_x86.c --- a/backend_x86.c Mon Dec 12 09:50:33 2016 -0800 +++ b/backend_x86.c Mon Dec 12 19:21:22 2016 -0800 @@ -231,7 +231,7 @@ code_ptr not_code = code->cur + 1; jcc(code, CC_NC, code->cur + 2); if (memmap[chunk].mask != opts->address_mask) { - or_ir(code, memmap[chunk].start, opts->scratch1, opts->address_size); + or_ir(code, memmap[chunk].start, opts->scratch2, opts->address_size); } call(code, opts->save_context); call_args(code, opts->handle_code_write, 2, opts->scratch2, opts->context_reg);