[Dosemu-cvs] [SCM] dosemu branch devel updated. dosemu-1.4.0.8-739-gc8f96f3
Brought to you by:
bartoldeman
From: Stas S. <st...@us...> - 2014-08-10 20:56:06
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "dosemu". The branch, devel has been updated via c8f96f31f44fac65467a826bfb0e11119f70b1c9 (commit) from d2b55cdcb824d607fdd18acdf0cea10d819c18a9 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://sourceforge.net/p/dosemu/code/ci/c8f96f31f44fac65467a826bfb0e11119f70b1c9 commit c8f96f31f44fac65467a826bfb0e11119f70b1c9 Author: Stas Sergeev <st...@us...> Date: Mon Aug 11 00:53:14 2014 +0400 CPUEMU: fix error logic of "stack patch failure, fix source code!" msg diff --git a/src/emu-i386/simx86/cpatch.c b/src/emu-i386/simx86/cpatch.c index 95ce111..6ea4974 100644 --- a/src/emu-i386/simx86/cpatch.c +++ b/src/emu-i386/simx86/cpatch.c @@ -438,7 +438,9 @@ int Cpatch(struct sigcontext_struct *scp) if (*p==0x66) w16=1,p++; else w16=0; v = *((int *)p) & 0xffffff; - while (v==0x0e0489) { // stack: never fail + if (v==0x0e0489) { // stack: never fail + int cnt = 0; + do { // mov %%{e}ax,(%%esi,%%ecx,1) // we have a sequence: 66 89 04 0e // or 89 04 0e @@ -454,11 +456,11 @@ int Cpatch(struct sigcontext_struct *scp) p += 9; if (*p==0x66) w16=1,p++; else w16=0; v = *((int *)p) & 0xffffff; - /* extra check: should not fail */ - if (v!=0x0e0489) { + cnt++; + } while (v==0x0e0489); + if (cnt < 2) dbug_printf("CPUEMU: stack patch failure, fix source code!\n"); - return 1; - } + return 1; } if (v==0x900788) { // movb %%al,(%%edi) // we have a sequence: 88 07 90 ----------------------------------------------------------------------- Summary of changes: src/emu-i386/simx86/cpatch.c | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) hooks/post-receive -- dosemu |