# HG changeset patch # User Michael Pavone # Date 1493957195 25200 # Node ID f1607874dbeeedfd04425f7562807629dea92a4a # Parent 101b5ce682fe9419317fb634a8c7bd25fe3bf507 Fix intermittent crash due to an inadvertent executable memory allocation in m68k instruction retranslation diff -r 101b5ce682fe -r f1607874dbee m68k_core.c --- a/m68k_core.c Thu May 04 21:00:25 2017 -0700 +++ b/m68k_core.c Thu May 04 21:06:35 2017 -0700 @@ -1095,10 +1095,12 @@ code_ptr native_end = code->cur; code->cur = native_start + MAX_NATIVE_SIZE; code_ptr rest = get_native_address_trans(context, orig + (after-inst)*2); - code_ptr tmp = code->cur; - code->cur = native_end; - jmp(code, rest); - code->cur = tmp; + code_info tmp_code = { + .cur = native_end, + .last = native_start + MAX_NATIVE_SIZE, + .stack_off = code->stack_off + }; + jmp(&tmp_code, rest); } else { code->cur = native_start + MAX_NATIVE_SIZE; }