André Hentschel : ntdll: Fix SystemRecommendedSharedDataAlignment on ARM.

Alexandre Julliard julliard at winehq.org
Mon May 18 15:00:13 CDT 2020


Module: wine
Branch: master
Commit: 44274d172bb72ef06157f5f8a84152a9e7fc5c82
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=44274d172bb72ef06157f5f8a84152a9e7fc5c82

Author: André Hentschel <nerv at dawncrow.de>
Date:   Sun May 17 15:54:33 2020 +0200

ntdll: Fix SystemRecommendedSharedDataAlignment on ARM.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=43961
Signed-off-by: André Hentschel <nerv at dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ntdll/nt.c         | 9 ++++++++-
 dlls/ntdll/tests/info.c | 4 ++++
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
index 4dced31641..2076806573 100644
--- a/dlls/ntdll/nt.c
+++ b/dlls/ntdll/nt.c
@@ -3034,7 +3034,14 @@ NTSTATUS WINAPI NtQuerySystemInformation(
             if (Length >= len)
             {
                 if (!SystemInformation) ret = STATUS_ACCESS_VIOLATION;
-                else *((DWORD *)SystemInformation) = 64;
+                else
+                {
+#ifdef __arm__
+                    *((DWORD *)SystemInformation) = 32;
+#else
+                    *((DWORD *)SystemInformation) = 64;
+#endif
+                }
             }
             else ret = STATUS_INFO_LENGTH_MISMATCH;
         }
diff --git a/dlls/ntdll/tests/info.c b/dlls/ntdll/tests/info.c
index 7a641f8b84..b591f39cea 100644
--- a/dlls/ntdll/tests/info.c
+++ b/dlls/ntdll/tests/info.c
@@ -2518,7 +2518,11 @@ static void test_query_data_alignment(void)
     status = pNtQuerySystemInformation(SystemRecommendedSharedDataAlignment, &value, sizeof(value), &ReturnLength);
     ok(status == STATUS_SUCCESS, "Expected STATUS_SUCCESS, got %08x\n", status);
     ok(sizeof(value) == ReturnLength, "Inconsistent length %u\n", ReturnLength);
+#ifdef __arm__
+    ok(value == 32, "Expected 32, got %u\n", value);
+#else
     ok(value == 64, "Expected 64, got %u\n", value);
+#endif
 }
 
 static void test_thread_lookup(void)




More information about the wine-cvs mailing list