ntdll-Activation_Context: Remove patch.

This was originally the third patch in a series, introduced by ec4e719cd6. The
first patch and the series itself was written by Mark Jansen and focused on an
incorrect handling of NULL in QueryActCtx(). It's not clear what those were
actually for, but they're upstream now.

My guess is that Sebastian noticed this "bug" while writing tests and wrote the
patch to fix it, as it's an easy one-liner. My guess is that he never submitted
it upstream either because it wasn't clearly correct (e.g. he wanted to actually
implement ACTIVATION_CONTEXT_SECTION_ASSEMBLY_INFORMATION) or because of
disagreements with upstream over project direction. As it happens there is a way
to get ACTIVATION_CONTEXT_SECTION_ASSEMBLY_INFORMATION to return valid data—pass
a NULL or empty string as the section name.

Anyway, the patch is likely to have never actually helped anything, and even if
it did, it's a one-liner with a FIXME message already attached, and so won't be
hard to debug again if necessary.
This commit is contained in:
Zebediah Figura 2021-04-19 18:14:37 -05:00
parent 85fbfed5eb
commit ba9a7a6a74
2 changed files with 0 additions and 129 deletions

View File

@ -1,116 +0,0 @@
From caf668bdbcf74b6f00d6d70ae6030007852a082d Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 16 Mar 2015 03:46:36 +0100
Subject: [PATCH] ntdll: Fix return value for missing
ACTIVATION_CONTEXT_SECTION_ASSEMBLY_INFORMATION key.
---
dlls/kernel32/tests/actctx.c | 36 ++++++++++++++++--------------------
dlls/ntdll/actctx.c | 3 +++
2 files changed, 19 insertions(+), 20 deletions(-)
diff --git a/dlls/kernel32/tests/actctx.c b/dlls/kernel32/tests/actctx.c
index 4b7096276e8..8effbdbc9bc 100644
--- a/dlls/kernel32/tests/actctx.c
+++ b/dlls/kernel32/tests/actctx.c
@@ -2365,7 +2365,7 @@ static HANDLE create_manifest(const char *filename, const char *data, int line)
return handle;
}
-static void kernel32_find(ULONG section, const char *string_to_find, BOOL should_find, BOOL todo, int line)
+static void kernel32_find(ULONG section, const char *string_to_find, BOOL should_find, int line)
{
UNICODE_STRING string_to_findW;
ACTCTX_SECTION_KEYED_DATA data;
@@ -2382,7 +2382,6 @@ static void kernel32_find(ULONG section, const char *string_to_find, BOOL should
err = GetLastError();
ok_(__FILE__, line)(ret == should_find,
"FindActCtxSectionStringA: expected ret = %u, got %u\n", should_find, ret);
- todo_wine_if(todo)
ok_(__FILE__, line)(err == (should_find ? ERROR_SUCCESS : ERROR_SXS_KEY_NOT_FOUND),
"FindActCtxSectionStringA: unexpected error %u\n", err);
@@ -2394,7 +2393,6 @@ static void kernel32_find(ULONG section, const char *string_to_find, BOOL should
err = GetLastError();
ok_(__FILE__, line)(ret == should_find,
"FindActCtxSectionStringW: expected ret = %u, got %u\n", should_find, ret);
- todo_wine_if(todo)
ok_(__FILE__, line)(err == (should_find ? ERROR_SUCCESS : ERROR_SXS_KEY_NOT_FOUND),
"FindActCtxSectionStringW: unexpected error %u\n", err);
@@ -2417,7 +2415,7 @@ static void kernel32_find(ULONG section, const char *string_to_find, BOOL should
pRtlFreeUnicodeString(&string_to_findW);
}
-static void ntdll_find(ULONG section, const char *string_to_find, BOOL should_find, BOOL todo, int line)
+static void ntdll_find(ULONG section, const char *string_to_find, BOOL should_find, int line)
{
UNICODE_STRING string_to_findW;
ACTCTX_SECTION_KEYED_DATA data;
@@ -2429,12 +2427,10 @@ static void ntdll_find(ULONG section, const char *string_to_find, BOOL should_fi
data.cbSize = sizeof(data);
ret = pRtlFindActivationContextSectionString(0, NULL, section, &string_to_findW, &data);
- todo_wine_if(todo)
ok_(__FILE__, line)(ret == (should_find ? STATUS_SUCCESS : STATUS_SXS_KEY_NOT_FOUND),
"RtlFindActivationContextSectionString: unexpected status 0x%x\n", ret);
ret = pRtlFindActivationContextSectionString(0, NULL, section, &string_to_findW, NULL);
- todo_wine_if(todo)
ok_(__FILE__, line)(ret == (should_find ? STATUS_SUCCESS : STATUS_SXS_KEY_NOT_FOUND),
"RtlFindActivationContextSectionString: unexpected status 0x%x\n", ret);
@@ -2452,22 +2448,22 @@ static void test_findsectionstring(void)
ok(ret, "ActivateActCtx failed: %u\n", GetLastError());
/* first we show the parameter validation from kernel32 */
- kernel32_find(ACTIVATION_CONTEXT_SECTION_ASSEMBLY_INFORMATION, "testdep", FALSE, TRUE, __LINE__);
- kernel32_find(ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION, "testlib.dll", TRUE, FALSE, __LINE__);
- kernel32_find(ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION, "testlib2.dll", TRUE, FALSE, __LINE__);
- kernel32_find(ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION, "testlib3.dll", FALSE, FALSE, __LINE__);
- kernel32_find(ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION, "wndClass", TRUE, FALSE, __LINE__);
- kernel32_find(ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION, "wndClass2", TRUE, FALSE, __LINE__);
- kernel32_find(ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION, "wndClass3", FALSE, FALSE, __LINE__);
+ kernel32_find(ACTIVATION_CONTEXT_SECTION_ASSEMBLY_INFORMATION, "testdep", FALSE, __LINE__);
+ kernel32_find(ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION, "testlib.dll", TRUE, __LINE__);
+ kernel32_find(ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION, "testlib2.dll", TRUE, __LINE__);
+ kernel32_find(ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION, "testlib3.dll", FALSE, __LINE__);
+ kernel32_find(ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION, "wndClass", TRUE, __LINE__);
+ kernel32_find(ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION, "wndClass2", TRUE, __LINE__);
+ kernel32_find(ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION, "wndClass3", FALSE, __LINE__);
/* then we show that ntdll plays by different rules */
- ntdll_find(ACTIVATION_CONTEXT_SECTION_ASSEMBLY_INFORMATION, "testdep", FALSE, TRUE, __LINE__);
- ntdll_find(ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION, "testlib.dll", TRUE, FALSE, __LINE__);
- ntdll_find(ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION, "testlib2.dll", TRUE, FALSE, __LINE__);
- ntdll_find(ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION, "testlib3.dll", FALSE, FALSE, __LINE__);
- ntdll_find(ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION, "wndClass", TRUE, FALSE, __LINE__);
- ntdll_find(ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION, "wndClass2", TRUE, FALSE, __LINE__);
- ntdll_find(ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION, "wndClass3", FALSE, FALSE, __LINE__);
+ ntdll_find(ACTIVATION_CONTEXT_SECTION_ASSEMBLY_INFORMATION, "testdep", FALSE, __LINE__);
+ ntdll_find(ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION, "testlib.dll", TRUE, __LINE__);
+ ntdll_find(ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION, "testlib2.dll", TRUE, __LINE__);
+ ntdll_find(ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION, "testlib3.dll", FALSE, __LINE__);
+ ntdll_find(ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION, "wndClass", TRUE, __LINE__);
+ ntdll_find(ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION, "wndClass2", TRUE, __LINE__);
+ ntdll_find(ACTIVATION_CONTEXT_SECTION_WINDOW_CLASS_REDIRECTION, "wndClass3", FALSE, __LINE__);
ret = DeactivateActCtx(0, cookie);
ok(ret, "DeactivateActCtx failed: %u\n", GetLastError());
diff --git a/dlls/ntdll/actctx.c b/dlls/ntdll/actctx.c
index 59e9671f9a8..c50d1a42fcf 100644
--- a/dlls/ntdll/actctx.c
+++ b/dlls/ntdll/actctx.c
@@ -4842,6 +4842,9 @@ static NTSTATUS find_string(ACTIVATION_CONTEXT* actctx, ULONG section_kind,
switch (section_kind)
{
+ case ACTIVATION_CONTEXT_SECTION_ASSEMBLY_INFORMATION:
+ FIXME("Unsupported yet section_kind %x\n", section_kind);
+ return STATUS_SXS_KEY_NOT_FOUND;
case ACTIVATION_CONTEXT_SECTION_DLL_REDIRECTION:
status = find_dll_redirection(actctx, section_name, data);
break;
--
2.17.1

View File

@ -148,7 +148,6 @@ patch_enable_all ()
enable_msvcrt_Math_Precision="$1"
enable_msxml3_FreeThreadedXMLHTTP60="$1"
enable_ntdll_APC_Performance="$1"
enable_ntdll_Activation_Context="$1"
enable_ntdll_ApiSetMap="$1"
enable_ntdll_Builtin_Prot="$1"
enable_ntdll_CriticalSection="$1"
@ -501,9 +500,6 @@ patch_enable ()
ntdll-APC_Performance)
enable_ntdll_APC_Performance="$2"
;;
ntdll-Activation_Context)
enable_ntdll_Activation_Context="$2"
;;
ntdll-ApiSetMap)
enable_ntdll_ApiSetMap="$2"
;;
@ -2790,15 +2786,6 @@ if test "$enable_ntdll_APC_Performance" -eq 1; then
patch_apply ntdll-APC_Performance/0001-ntdll-Reuse-old-async-fileio-structures-if-possible.patch
fi
# Patchset ntdll-Activation_Context
# |
# | Modified files:
# | * dlls/kernel32/tests/actctx.c, dlls/ntdll/actctx.c
# |
if test "$enable_ntdll_Activation_Context" -eq 1; then
patch_apply ntdll-Activation_Context/0001-ntdll-Fix-return-value-for-missing-ACTIVATION_CONTEX.patch
fi
# Patchset ntdll-ApiSetMap
# |
# | This patchset fixes the following Wine bugs: