Rebase against 7be8beab68c5074e78c899acac7ccb6eb2f7e22e

This commit is contained in:
Zebediah Figura 2018-02-24 17:43:27 -06:00
parent 4cb811ac52
commit ac17c5d866
7 changed files with 1 additions and 364 deletions

View File

@ -1,65 +0,0 @@
From d6455eb2f3ff2f6d8d663c8254a42c310564c39e Mon Sep 17 00:00:00 2001
From: Mark Jansen <learn0more@gmail.com>
Date: Thu, 14 May 2015 00:52:42 +0200
Subject: imagehlp/tests: msvc compatibility fixes.
---
dlls/imagehlp/tests/image.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/dlls/imagehlp/tests/image.c b/dlls/imagehlp/tests/image.c
index 74068dd..8299630 100644
--- a/dlls/imagehlp/tests/image.c
+++ b/dlls/imagehlp/tests/image.c
@@ -60,7 +60,7 @@ struct Imports {
} ibn;
char dllname[0x10];
};
-#define EXIT_PROCESS (VA_START+RVA_IDATA+FIELD_OFFSET(struct Imports, thunks[0]))
+#define EXIT_PROCESS (VA_START+RVA_IDATA+FIELD_OFFSET(struct Imports, thunks))
static struct _PeImage {
IMAGE_DOS_HEADER dos_header;
@@ -74,9 +74,9 @@ static struct _PeImage {
char __alignment3[FILE_TOTAL-FILE_IDATA-sizeof(struct Imports)];
} bin = {
/* dos header */
- {IMAGE_DOS_SIGNATURE, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {}, 0, 0, {}, FILE_PE_START},
+ {IMAGE_DOS_SIGNATURE, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0}, 0, 0, {0}, FILE_PE_START},
/* alignment before PE header */
- {},
+ {0},
/* nt headers */
{IMAGE_NT_SIGNATURE,
/* basic headers - 3 sections, no symbols, EXE file */
@@ -103,7 +103,7 @@ static struct _PeImage {
0, 0, 0, IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ | IMAGE_SCN_MEM_WRITE}
},
/* alignment before first section */
- {},
+ {0},
/* .text section */
{
0x31, 0xC0, /* xor eax, eax */
@@ -126,7 +126,7 @@ static struct _PeImage {
"KERNEL32.DLL"
},
/* final alignment */
- {}
+ {0}
};
#include <poppack.h>
@@ -226,7 +226,8 @@ static const struct expected_blob b1[] = {
{FILE_IDATA-FILE_TEXT, &bin.text_section},
{sizeof(bin.idata_section.descriptors[0].u.OriginalFirstThunk),
&bin.idata_section.descriptors[0].u.OriginalFirstThunk},
- {FIELD_OFFSET(struct Imports, thunks)-FIELD_OFFSET(struct Imports, descriptors[0].Name),
+ {FIELD_OFFSET(struct Imports, thunks)-
+ (FIELD_OFFSET(struct Imports, descriptors)+FIELD_OFFSET(IMAGE_IMPORT_DESCRIPTOR, Name)),
&bin.idata_section.descriptors[0].Name},
{FILE_TOTAL-FILE_IDATA-FIELD_OFFSET(struct Imports, ibn),
&bin.idata_section.ibn}
--
2.4.0

View File

@ -1,143 +0,0 @@
From f1b8afc713f881f8c0ff5328d030dda53ba166ec Mon Sep 17 00:00:00 2001
From: Mark Jansen <mark.jansen@reactos.org>
Date: Fri, 22 Sep 2017 11:20:27 +0200
Subject: kernel32/tests: Close process / thread handles
Signed-off-by: Mark Jansen <mark.jansen@reactos.org>
---
dlls/kernel32/tests/process.c | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/dlls/kernel32/tests/process.c b/dlls/kernel32/tests/process.c
index 0ff1fb165c8..d2afdbdfd71 100644
--- a/dlls/kernel32/tests/process.c
+++ b/dlls/kernel32/tests/process.c
@@ -620,6 +620,8 @@ static void test_Startup(void)
ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n");
/* child process has changed result file, so let profile functions know about it */
WritePrivateProfileStringA(NULL, NULL, NULL, resfile);
+ CloseHandle(info.hThread);
+ CloseHandle(info.hProcess);
GetStartupInfoA(&si);
okChildInt("StartupInfoA", "cb", startup.cb);
@@ -658,6 +660,8 @@ static void test_Startup(void)
ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n");
/* child process has changed result file, so let profile functions know about it */
WritePrivateProfileStringA(NULL, NULL, NULL, resfile);
+ CloseHandle(info.hThread);
+ CloseHandle(info.hProcess);
okChildInt("StartupInfoA", "cb", startup.cb);
okChildString("StartupInfoA", "lpDesktop", startup.lpDesktop);
@@ -696,6 +700,8 @@ static void test_Startup(void)
ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n");
/* child process has changed result file, so let profile functions know about it */
WritePrivateProfileStringA(NULL, NULL, NULL, resfile);
+ CloseHandle(info.hThread);
+ CloseHandle(info.hProcess);
okChildInt("StartupInfoA", "cb", startup.cb);
okChildString("StartupInfoA", "lpDesktop", si.lpDesktop);
@@ -734,6 +740,8 @@ static void test_Startup(void)
ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n");
/* child process has changed result file, so let profile functions know about it */
WritePrivateProfileStringA(NULL, NULL, NULL, resfile);
+ CloseHandle(info.hThread);
+ CloseHandle(info.hProcess);
okChildInt("StartupInfoA", "cb", startup.cb);
okChildString("StartupInfoA", "lpDesktop", startup.lpDesktop);
@@ -772,6 +780,8 @@ static void test_Startup(void)
ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n");
/* child process has changed result file, so let profile functions know about it */
WritePrivateProfileStringA(NULL, NULL, NULL, resfile);
+ CloseHandle(info.hThread);
+ CloseHandle(info.hProcess);
okChildInt("StartupInfoA", "cb", startup.cb);
okChildString("StartupInfoA", "lpDesktop", startup.lpDesktop);
@@ -812,6 +822,8 @@ static void test_Startup(void)
ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n");
/* child process has changed result file, so let profile functions know about it */
WritePrivateProfileStringA(NULL, NULL, NULL, resfile);
+ CloseHandle(info.hThread);
+ CloseHandle(info.hProcess);
okChildInt("StartupInfoA", "cb", startup.cb);
okChildString("StartupInfoA", "lpDesktop", startup.lpDesktop);
@@ -850,6 +862,8 @@ static void test_Startup(void)
ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n");
/* child process has changed result file, so let profile functions know about it */
WritePrivateProfileStringA(NULL, NULL, NULL, resfile);
+ CloseHandle(info.hThread);
+ CloseHandle(info.hProcess);
okChildInt("StartupInfoA", "cb", startup.cb);
okChildString("StartupInfoA", "lpDesktop", startup.lpDesktop);
@@ -890,6 +904,8 @@ static void test_CommandLine(void)
ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n");
/* child process has changed result file, so let profile functions know about it */
WritePrivateProfileStringA(NULL, NULL, NULL, resfile);
+ CloseHandle(info.hThread);
+ CloseHandle(info.hProcess);
okChildInt("Arguments", "argcA", 5);
okChildString("Arguments", "argvA4", "C:\\Program Files\\my nice app.exe");
@@ -911,6 +927,8 @@ static void test_CommandLine(void)
ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n");
/* child process has changed result file, so let profile functions know about it */
WritePrivateProfileStringA(NULL, NULL, NULL, resfile);
+ CloseHandle(info.hThread);
+ CloseHandle(info.hProcess);
okChildInt("Arguments", "argcA", 7);
okChildString("Arguments", "argvA4", "a\"b\\");
@@ -932,6 +950,8 @@ static void test_CommandLine(void)
ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n");
/* child process has changed result file, so let profile functions know about it */
WritePrivateProfileStringA(NULL, NULL, NULL, resfile);
+ CloseHandle(info.hThread);
+ CloseHandle(info.hProcess);
sprintf(buffer, "./%s", exename);
okChildString("Arguments", "argvA0", buffer);
release_memory();
@@ -947,6 +967,8 @@ static void test_CommandLine(void)
ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n");
/* child process has changed result file, so let profile functions know about it */
WritePrivateProfileStringA(NULL, NULL, NULL, resfile);
+ CloseHandle(info.hThread);
+ CloseHandle(info.hProcess);
sprintf(buffer, ".\\%s", exename);
okChildString("Arguments", "argvA0", buffer);
release_memory();
@@ -967,6 +989,8 @@ static void test_CommandLine(void)
ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n");
/* child process has changed result file, so let profile functions know about it */
WritePrivateProfileStringA(NULL, NULL, NULL, resfile);
+ CloseHandle(info.hThread);
+ CloseHandle(info.hProcess);
if (p) sprintf(buffer, "..%s/%s", p, exename);
else sprintf(buffer, "./%s", exename);
okChildString("Arguments", "argvA0", buffer);
@@ -990,6 +1014,8 @@ static void test_CommandLine(void)
ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n");
/* child process has changed result file, so let profile functions know about it */
WritePrivateProfileStringA(NULL, NULL, NULL, resfile);
+ CloseHandle(info.hThread);
+ CloseHandle(info.hProcess);
sprintf(buffer, "tests/process.c dump %s", resfile);
okChildString("Arguments", "argvA0", "dummy");
okChildString("Arguments", "CommandLineA", buffer2);
@@ -1087,6 +1113,8 @@ static void test_Directory(void)
ok(WaitForSingleObject(info.hProcess, 30000) == WAIT_OBJECT_0, "Child process termination\n");
/* child process has changed result file, so let profile functions know about it */
WritePrivateProfileStringA(NULL, NULL, NULL, resfile);
+ CloseHandle(info.hThread);
+ CloseHandle(info.hProcess);
okChildIString("Misc", "CurrDirA", windir);
release_memory();
--
2.14.1

View File

@ -1,31 +0,0 @@
From 44d6e7a718e083aba1127ec6927bc6171f5672d8 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 9 Oct 2017 14:18:30 +0200
Subject: ntdll: Don't fail in NtUnmapViewOfSection when trying to unmap
builtin view.
Fixes a regression introduced in a557934c76c0e0bed6b73e5c8f79a0df059ff2de.
---
dlls/ntdll/virtual.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c
index d28b138e575..70137ec79a4 100644
--- a/dlls/ntdll/virtual.c
+++ b/dlls/ntdll/virtual.c
@@ -3085,7 +3085,11 @@ NTSTATUS WINAPI NtUnmapViewOfSection( HANDLE process, PVOID addr )
if (!status) delete_view( view );
else FIXME( "failed to unmap %p %x\n", view->base, status );
}
- else delete_view( view );
+ else
+ {
+ delete_view( view );
+ status = STATUS_SUCCESS;
+ }
}
server_leave_uninterrupted_section( &csVirtual, &sigset );
return status;
--
2.14.1

View File

@ -1 +0,0 @@
Fixes: Don't fail in NtUnmapViewOfSection when trying to unmap builtin view

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "f9e1dbb83d850a2f7cb17079e02de139e2f8b920"
echo "7be8beab68c5074e78c899acac7ccb6eb2f7e22e"
}
# Show version information
@ -197,7 +197,6 @@ patch_enable_all ()
enable_kernel32_SCSI_Sysfs="$1"
enable_kernel32_SetFileCompletionNotificationModes="$1"
enable_kernel32_TRUST_E_NOSIGNATURE="$1"
enable_kernel32_Tests="$1"
enable_kernel32_TimezoneInformation_Registry="$1"
enable_kernel32_UmsStubs="$1"
enable_kernel32_VerifyVersionInfo="$1"
@ -258,7 +257,6 @@ patch_enable_all ()
enable_ntdll_NtSetInformationToken="$1"
enable_ntdll_NtSetLdtEntries="$1"
enable_ntdll_NtSuspendProcess="$1"
enable_ntdll_NtUnmapViewOfSection="$1"
enable_ntdll_Pipe_SpecialCharacters="$1"
enable_ntdll_ProcessImageFileNameWin32="$1"
enable_ntdll_ProcessPriorityClass="$1"
@ -360,7 +358,6 @@ patch_enable_all ()
enable_shell32_Toolbar_Bitmaps="$1"
enable_shell32_UnixFS="$1"
enable_shlwapi_AssocGetPerceivedType="$1"
enable_shlwapi_PathUnExpandEnvStrings="$1"
enable_shlwapi_SHAddDataBlock="$1"
enable_shlwapi_SHMapHandle="$1"
enable_shlwapi_UrlCombine="$1"
@ -838,9 +835,6 @@ patch_enable ()
kernel32-TRUST_E_NOSIGNATURE)
enable_kernel32_TRUST_E_NOSIGNATURE="$2"
;;
kernel32-Tests)
enable_kernel32_Tests="$2"
;;
kernel32-TimezoneInformation_Registry)
enable_kernel32_TimezoneInformation_Registry="$2"
;;
@ -1021,9 +1015,6 @@ patch_enable ()
ntdll-NtSuspendProcess)
enable_ntdll_NtSuspendProcess="$2"
;;
ntdll-NtUnmapViewOfSection)
enable_ntdll_NtUnmapViewOfSection="$2"
;;
ntdll-Pipe_SpecialCharacters)
enable_ntdll_Pipe_SpecialCharacters="$2"
;;
@ -1327,9 +1318,6 @@ patch_enable ()
shlwapi-AssocGetPerceivedType)
enable_shlwapi_AssocGetPerceivedType="$2"
;;
shlwapi-PathUnExpandEnvStrings)
enable_shlwapi_PathUnExpandEnvStrings="$2"
;;
shlwapi-SHAddDataBlock)
enable_shlwapi_SHAddDataBlock="$2"
;;
@ -4701,10 +4689,8 @@ fi
# |
if test "$enable_imagehlp_ImageLoad" -eq 1; then
patch_apply imagehlp-ImageLoad/0001-imagehlp-tests-Add-tests-for-ImageLoad-ImageUnload-G.patch
patch_apply imagehlp-ImageLoad/0002-imagehlp-tests-msvc-compatibility-fixes.patch
(
printf '%s\n' '+ { "Mark Jansen", "imagehlp/tests: Add tests for ImageLoad, ImageUnload, GetImageUnusedHeaderBytes.", 1 },';
printf '%s\n' '+ { "Mark Jansen", "imagehlp/tests: Msvc compatibility fixes.", 1 },';
) >> "$patchlist"
fi
@ -5112,18 +5098,6 @@ if test "$enable_kernel32_TRUST_E_NOSIGNATURE" -eq 1; then
) >> "$patchlist"
fi
# Patchset kernel32-Tests
# |
# | Modified files:
# | * dlls/kernel32/tests/process.c
# |
if test "$enable_kernel32_Tests" -eq 1; then
patch_apply kernel32-Tests/0001-kernel32-tests-Close-process-thread-handles.patch
(
printf '%s\n' '+ { "Mark Jansen", "kernel32/tests: Close process / thread handles.", 1 },';
) >> "$patchlist"
fi
# Patchset kernel32-TimezoneInformation_Registry
# |
# | Modified files:
@ -6155,18 +6129,6 @@ if test "$enable_ntdll_NtSuspendProcess" -eq 1; then
) >> "$patchlist"
fi
# Patchset ntdll-NtUnmapViewOfSection
# |
# | Modified files:
# | * dlls/ntdll/virtual.c
# |
if test "$enable_ntdll_NtUnmapViewOfSection" -eq 1; then
patch_apply ntdll-NtUnmapViewOfSection/0001-ntdll-Don-t-fail-in-NtUnmapViewOfSection-when-trying.patch
(
printf '%s\n' '+ { "Sebastian Lackner", "ntdll: Don'\''t fail in NtUnmapViewOfSection when trying to unmap builtin view.", 1 },';
) >> "$patchlist"
fi
# Patchset ntdll-ProcessImageFileNameWin32
# |
# | Modified files:
@ -7783,18 +7745,6 @@ if test "$enable_shlwapi_AssocGetPerceivedType" -eq 1; then
) >> "$patchlist"
fi
# Patchset shlwapi-PathUnExpandEnvStrings
# |
# | Modified files:
# | * dlls/shlwapi/path.c, dlls/shlwapi/tests/path.c
# |
if test "$enable_shlwapi_PathUnExpandEnvStrings" -eq 1; then
patch_apply shlwapi-PathUnExpandEnvStrings/0001-shlwapi-Don-t-attempt-to-unexpand-ComputerName-in-Pa.patch
(
printf '%s\n' '+ { "Katayama Hirofumi MZ", "shlwapi: Don'\''t attempt to unexpand ComputerName in PathUnExpandEnvStrings.", 1 },';
) >> "$patchlist"
fi
# Patchset shlwapi-SHAddDataBlock
# |
# | Modified files:

View File

@ -1,72 +0,0 @@
From 177a262f06e4278726e1d60b9dc9e5108a621bff Mon Sep 17 00:00:00 2001
From: Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
Date: Sat, 23 Sep 2017 03:41:32 +0900
Subject: shlwapi: Don't attempt to unexpand ComputerName in
PathUnExpandEnvStrings.
---
dlls/shlwapi/path.c | 2 --
dlls/shlwapi/tests/path.c | 18 ++++++++++++++++--
2 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/dlls/shlwapi/path.c b/dlls/shlwapi/path.c
index 3c07bb8d10a..f972f9d61cf 100644
--- a/dlls/shlwapi/path.c
+++ b/dlls/shlwapi/path.c
@@ -4097,7 +4097,6 @@ BOOL WINAPI PathUnExpandEnvStringsA(LPCSTR path, LPSTR buffer, UINT buf_len)
static const WCHAR allusersprofileW[] = {'%','A','L','L','U','S','E','R','S','P','R','O','F','I','L','E','%',0};
static const WCHAR appdataW[] = {'%','A','P','P','D','A','T','A','%',0};
-static const WCHAR computernameW[] = {'%','C','O','M','P','U','T','E','R','N','A','M','E','%',0};
static const WCHAR programfilesW[] = {'%','P','r','o','g','r','a','m','F','i','l','e','s','%',0};
static const WCHAR systemrootW[] = {'%','S','y','s','t','e','m','R','o','o','t','%',0};
static const WCHAR systemdriveW[] = {'%','S','y','s','t','e','m','D','r','i','v','e','%',0};
@@ -4134,7 +4133,6 @@ BOOL WINAPI PathUnExpandEnvStringsW(LPCWSTR path, LPWSTR buffer, UINT buf_len)
struct envvars_map envvars[] = {
{ allusersprofileW, sizeof(allusersprofileW)/sizeof(WCHAR) },
{ appdataW, sizeof(appdataW)/sizeof(WCHAR) },
- { computernameW, sizeof(computernameW)/sizeof(WCHAR) },
{ programfilesW, sizeof(programfilesW)/sizeof(WCHAR) },
{ systemrootW, sizeof(systemrootW)/sizeof(WCHAR) },
{ systemdriveW, sizeof(systemdriveW)/sizeof(WCHAR) },
diff --git a/dlls/shlwapi/tests/path.c b/dlls/shlwapi/tests/path.c
index f780a78c68c..8fb2dc2c1e6 100644
--- a/dlls/shlwapi/tests/path.c
+++ b/dlls/shlwapi/tests/path.c
@@ -1451,10 +1451,11 @@ static void test_PathUnExpandEnvStrings(void)
static const WCHAR sysrootW[] = {'%','S','y','s','t','e','m','R','o','o','t','%',0};
static const WCHAR sysdriveW[] = {'%','S','y','s','t','e','m','D','r','i','v','e','%',0};
static const WCHAR nonpathW[] = {'p','a','t','h',0};
+ static const WCHAR computernameW[] = {'C','O','M','P','U','T','E','R','N','A','M','E',0};
static const char sysrootA[] = "%SystemRoot%";
static const char sysdriveA[] = "%SystemDrive%";
- WCHAR pathW[MAX_PATH], buffW[MAX_PATH], sysdrvW[3];
- char path[MAX_PATH], buff[MAX_PATH], sysdrvA[3], envvarA[10];
+ WCHAR pathW[MAX_PATH], buffW[MAX_PATH], sysdrvW[3], envvarW[30];
+ char path[MAX_PATH], buff[MAX_PATH], sysdrvA[3], envvarA[30];
BOOL ret;
UINT len;
@@ -1464,6 +1465,19 @@ static void test_PathUnExpandEnvStrings(void)
return;
}
+ /* The value of ComputerName is not a path */
+ ret = GetEnvironmentVariableA("COMPUTERNAME", envvarA, sizeof(envvarA));
+ ok(ret, "got %d\n", ret);
+ SetLastError(0xdeadbeef);
+ ret = pPathUnExpandEnvStringsA(envvarA, buff, sizeof(buff));
+ ok(!ret && GetLastError() == 0xdeadbeef, "got %d, error %d\n", ret, GetLastError());
+
+ ret = GetEnvironmentVariableW(computernameW, envvarW, sizeof(envvarW)/sizeof(WCHAR));
+ ok(ret, "got %d\n", ret);
+ SetLastError(0xdeadbeef);
+ ret = pPathUnExpandEnvStringsW(envvarW, buffW, sizeof(buffW)/sizeof(WCHAR));
+ ok(!ret && GetLastError() == 0xdeadbeef, "got %d, error %d\n", ret, GetLastError());
+
/* something that can't be represented with env var */
strcpy(path, "somepath_name");
strcpy(buff, "xx");
--
2.14.1

View File

@ -1 +0,0 @@
Fixes: Don't unexpand ComputerName in PathUnExpandEnvStrings