[PATCH 2/2] ntdll/tests: Align check test correctly clears AC flag.

Jefferson Carpenter jeffersoncarpenter2 at gmail.com
Sun Dec 27 06:38:24 CST 2020


RESEND

Makes sure AC flag is set back to its original value regardless of the 
outcome of the test, so it will not interfere with subsequent tests.

thanks,
Jefferson
-------------- next part --------------
From be89840ada10a9a6527bd2bd76cdf4ac6fbc21df Mon Sep 17 00:00:00 2001
From: Jefferson Carpenter <jeffersoncarpenter2 at gmail.com>
Date: Sun, 27 Dec 2020 12:58:27 +0000
Subject: [PATCH 2/2] ntdll/tests: Align check test correctly clears AC flag.

The align check bit is cleared in segv_handler, and it is re-set by
the code that is ostensibly supposed to clear it.  This patch restores
the flags exactly as they were loaded, so the AC flag does not remain
set as subsequent tests run.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49771
Signed-off-by: Jefferson Carpenter <jeffersoncarpenter2 at gmail.com>
---
 dlls/ntdll/tests/exception.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c
index 44c03a6e52a..ca338775351 100644
--- a/dlls/ntdll/tests/exception.c
+++ b/dlls/ntdll/tests/exception.c
@@ -850,16 +850,13 @@ static const BYTE align_check_code[] = {
     0x55,                  	/* push   %ebp */
     0x89,0xe5,             	/* mov    %esp,%ebp */
     0x9c,                  	/* pushf   */
+    0x9c,                  	/* pushf   */
     0x58,                  	/* pop    %eax */
     0x0d,0,0,4,0,       	/* or     $0x40000,%eax */
     0x50,                  	/* push   %eax */
     0x9d,                  	/* popf    */
     0x89,0xe0,                  /* mov %esp, %eax */
     0x8b,0x40,0x1,              /* mov 0x1(%eax), %eax - cause exception */
-    0x9c,                  	/* pushf   */
-    0x58,                  	/* pop    %eax */
-    0x35,0,0,4,0,       	/* xor    $0x40000,%eax */
-    0x50,                  	/* push   %eax */
     0x9d,                  	/* popf    */
     0x5d,                  	/* pop    %ebp */
     0xc3,                  	/* ret     */
-- 
2.26.2



More information about the wine-devel mailing list