Rebase against 8da914b27c9939ecf511001bcac1a6c74e7edde0.

This commit is contained in:
Elizabeth Figura
2025-09-21 16:54:15 -05:00
parent 64988e15df
commit 20ba4773d6
5 changed files with 31 additions and 225 deletions

View File

@@ -1,4 +1,4 @@
From ca8481ab78a89e7433f25c340b7e3965d9f3e092 Mon Sep 17 00:00:00 2001
From bbbd7c18f96f8bbaf7caf6d43fea894113150739 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sat, 30 May 2015 02:23:15 +0200
Subject: [PATCH] ntdll: Add support for hiding wine version information from
@@ -10,10 +10,10 @@ Subject: [PATCH] ntdll: Add support for hiding wine version information from
2 files changed, 103 insertions(+), 1 deletion(-)
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index d263a6a786d..04dd4c106e3 100644
index fbb6a5f3d2a..9b30a86e1ac 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -88,6 +88,9 @@ const WCHAR system_dir[] = L"C:\\windows\\system32\\";
@@ -87,6 +87,9 @@ static const WCHAR system_dir[] = L"C:\\windows\\system32\\";
/* system search path */
static const WCHAR system_path[] = L"C:\\windows\\system32;C:\\windows\\system;C:\\windows";
@@ -32,7 +32,7 @@ index d263a6a786d..04dd4c106e3 100644
struct ldr_notification
{
struct list entry;
@@ -2049,6 +2054,96 @@ NTSTATUS WINAPI LdrUnlockLoaderLock( ULONG flags, ULONG_PTR magic )
@@ -2052,6 +2057,96 @@ NTSTATUS WINAPI LdrUnlockLoaderLock( ULONG flags, ULONG_PTR magic )
}
@@ -129,7 +129,7 @@ index d263a6a786d..04dd4c106e3 100644
/******************************************************************
* LdrGetProcedureAddress (NTDLL.@)
*/
@@ -2069,7 +2164,7 @@ NTSTATUS WINAPI LdrGetProcedureAddress(HMODULE module, const ANSI_STRING *name,
@@ -2072,7 +2167,7 @@ NTSTATUS WINAPI LdrGetProcedureAddress(HMODULE module, const ANSI_STRING *name,
{
void *proc = name ? find_named_export( module, exports, exp_size, name->Buffer, -1, NULL, wm, TRUE )
: find_ordinal_export( module, exports, exp_size, ord - exports->Base, NULL, wm, TRUE );
@@ -138,20 +138,20 @@ index d263a6a786d..04dd4c106e3 100644
{
*address = proc;
ret = STATUS_SUCCESS;
@@ -2340,6 +2435,8 @@ static void build_ntdll_module(void)
wm->ldr.Flags &= ~LDR_DONT_RESOLVE_REFS;
@@ -2344,6 +2439,8 @@ static void build_ntdll_module(void)
node_ntdll = wm->ldr.DdagNode;
if (TRACE_ON(relay)) RELAY_SetupDLL( module );
TRACE_(loaddll)( "Loaded %s at %p: builtin\n", debugstr_w(wm->ldr.FullDllName.Buffer), module);
+
+ hidden_exports_init( wm->ldr.FullDllName.Buffer );
}
diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h
index fb5fb311646..a342cbf7d26 100644
index 99e0aceeef3..d392518d4f3 100644
--- a/dlls/ntdll/ntdll_misc.h
+++ b/dlls/ntdll/ntdll_misc.h
@@ -117,6 +117,11 @@ static inline void *get_rva( HMODULE module, DWORD va )
@@ -114,6 +114,11 @@ static inline void *get_rva( HMODULE module, DWORD va )
return (void *)((char *)module + va);
}
@@ -164,5 +164,5 @@ index fb5fb311646..a342cbf7d26 100644
static inline void ascii_to_unicode( WCHAR *dst, const char *src, size_t len )
{
--
2.47.2
2.50.1

View File

@@ -1,4 +1,4 @@
From da9b85d2993598eb6153d5e1610ba327284715a6 Mon Sep 17 00:00:00 2001
From 623d7db7b7e909c2c2dfd40acc454e8c344bd7f1 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 15 Mar 2015 01:05:48 +0100
Subject: [PATCH] server: Fix handling of GetMessage after previous PeekMessage
@@ -15,10 +15,10 @@ Changes in v3:
2 files changed, 65 insertions(+), 17 deletions(-)
diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c
index a5f7318dffd..e50ddc45038 100644
index c8a12a6f998..618eba3419a 100644
--- a/dlls/user32/tests/msg.c
+++ b/dlls/user32/tests/msg.c
@@ -14569,13 +14569,10 @@ static void test_PeekMessage3(void)
@@ -14609,13 +14609,10 @@ static void test_PeekMessage3(void)
ok(msg.message == WM_TIMER, "msg.message = %u instead of WM_TIMER\n", msg.message);
PostMessageA(hwnd, WM_USER, 0, 0);
ret = PeekMessageA(&msg, hwnd, 0, 0, PM_NOREMOVE);
@@ -32,7 +32,7 @@ index a5f7318dffd..e50ddc45038 100644
ok(ret && msg.message == WM_USER, "msg.message = %u instead of WM_USER\n", msg.message);
ret = PeekMessageA(&msg, hwnd, 0, 0, 0);
ok(!ret, "expected PeekMessage to return FALSE, got %u\n", ret);
@@ -14585,10 +14582,8 @@ static void test_PeekMessage3(void)
@@ -14625,10 +14622,8 @@ static void test_PeekMessage3(void)
ok(msg.message == WM_TIMER, "msg.message = %u instead of WM_TIMER\n", msg.message);
PostMessageA(hwnd, WM_USER, 0, 0);
ret = PeekMessageA(&msg, hwnd, 0, 0, PM_REMOVE);
@@ -43,7 +43,7 @@ index a5f7318dffd..e50ddc45038 100644
ok(ret && msg.message == WM_USER, "msg.message = %u instead of WM_USER\n", msg.message);
ret = PeekMessageA(&msg, hwnd, 0, 0, 0);
ok(!ret, "expected PeekMessage to return FALSE, got %u\n", ret);
@@ -14600,10 +14595,11 @@ static void test_PeekMessage3(void)
@@ -14640,10 +14635,11 @@ static void test_PeekMessage3(void)
ok(msg.message == WM_TIMER, "msg.message = %u instead of WM_TIMER\n", msg.message);
PostMessageA(hwnd, WM_USER, 0, 0);
ret = GetMessageA(&msg, hwnd, 0, 0);
@@ -57,7 +57,7 @@ index a5f7318dffd..e50ddc45038 100644
ok(ret && msg.message == WM_USER, "msg.message = %u instead of WM_USER\n", msg.message);
ret = PeekMessageA(&msg, hwnd, 0, 0, 0);
ok(!ret, "expected PeekMessage to return FALSE, got %u\n", ret);
@@ -14631,14 +14627,32 @@ static void test_PeekMessage3(void)
@@ -14671,14 +14667,32 @@ static void test_PeekMessage3(void)
ret = GetMessageA(&msg, hwnd, 0, 0);
ok(ret && msg.message == WM_USER, "msg.message = %u instead of WM_USER\n", msg.message);
ret = GetMessageA(&msg, hwnd, 0, 0);
@@ -93,7 +93,7 @@ index a5f7318dffd..e50ddc45038 100644
* because both messages are in the same queue. */
diff --git a/server/queue.c b/server/queue.c
index 3845a86c962..ed5ebf6996e 100644
index 3f06c15d006..46c52c32d24 100644
--- a/server/queue.c
+++ b/server/queue.c
@@ -136,6 +136,7 @@ struct msg_queue
@@ -104,15 +104,15 @@ index 3845a86c962..ed5ebf6996e 100644
};
struct hotkey
@@ -318,6 +319,7 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_
@@ -319,6 +320,7 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_
queue->input = (struct thread_input *)grab_object( input );
queue->hooks = NULL;
queue->last_get_msg = current_time;
queue->keystate_lock = 0;
+ queue->ignore_post_msg = 0;
queue->waiting = 0;
list_init( &queue->send_result );
list_init( &queue->callback_result );
@@ -812,13 +814,21 @@ static inline struct msg_queue *get_current_queue(void)
@@ -818,13 +820,21 @@ static inline struct msg_queue *get_current_queue(void)
}
/* get a (pseudo-)unique id to tag hardware messages */
@@ -135,7 +135,7 @@ index 3845a86c962..ed5ebf6996e 100644
/* lookup an already queued mouse message that matches the message, window and type */
static struct message *find_mouse_message( struct thread_input *input, const struct message *msg )
{
@@ -1169,7 +1179,7 @@ static int match_window( user_handle_t win, user_handle_t msg_win )
@@ -1175,7 +1185,7 @@ static int match_window( user_handle_t win, user_handle_t msg_win )
}
/* retrieve a posted message */
@@ -144,7 +144,7 @@ index 3845a86c962..ed5ebf6996e 100644
unsigned int first, unsigned int last, unsigned int flags,
struct get_message_reply *reply )
{
@@ -1180,6 +1190,7 @@ static int get_posted_message( struct msg_queue *queue, user_handle_t win,
@@ -1186,6 +1196,7 @@ static int get_posted_message( struct msg_queue *queue, user_handle_t win,
{
if (!match_window( win, msg->win )) continue;
if (!check_msg_filter( msg->msg, first, last )) continue;
@@ -177,7 +177,7 @@ index 3845a86c962..ed5ebf6996e 100644
get_message_defaults( thread->queue, &msg->x, &msg->y, &msg->time );
@@ -3259,6 +3272,7 @@ DECL_HANDLER(send_message)
@@ -3254,6 +3267,7 @@ DECL_HANDLER(send_message)
set_queue_bits( recv_queue, QS_SENDMESSAGE );
break;
case MSG_POSTED:
@@ -185,7 +185,7 @@ index 3845a86c962..ed5ebf6996e 100644
list_add_tail( &recv_queue->msg_list[POST_MESSAGE], &msg->entry );
set_queue_bits( recv_queue, QS_POSTMESSAGE|QS_ALLPOSTMESSAGE );
if (msg->msg == WM_HOTKEY)
@@ -3395,12 +3409,12 @@ DECL_HANDLER(get_message)
@@ -3394,12 +3408,12 @@ DECL_HANDLER(get_message)
/* then check for posted messages */
if ((filter & QS_POSTMESSAGE) &&
@@ -200,7 +200,7 @@ index 3845a86c962..ed5ebf6996e 100644
return;
/* only check for quit messages if not posted messages pending */
@@ -3411,7 +3425,7 @@ DECL_HANDLER(get_message)
@@ -3410,7 +3424,7 @@ DECL_HANDLER(get_message)
if ((filter & QS_INPUT) &&
filter_contains_hw_range( req->get_first, req->get_last ) &&
get_hardware_message( current, req->hw_id, get_win, req->get_first, req->get_last, req->flags, reply ))
@@ -209,7 +209,7 @@ index 3845a86c962..ed5ebf6996e 100644
/* now check for WM_PAINT */
if ((filter & QS_PAINT) &&
@@ -3424,7 +3438,7 @@ DECL_HANDLER(get_message)
@@ -3423,7 +3437,7 @@ DECL_HANDLER(get_message)
reply->wparam = 0;
reply->lparam = 0;
get_message_defaults( queue, &reply->x, &reply->y, &reply->time );
@@ -218,7 +218,7 @@ index 3845a86c962..ed5ebf6996e 100644
}
/* now check for timer */
@@ -3440,9 +3454,19 @@ DECL_HANDLER(get_message)
@@ -3439,9 +3453,19 @@ DECL_HANDLER(get_message)
get_message_defaults( queue, &reply->x, &reply->y, &reply->time );
if (!(req->flags & PM_NOYIELD) && current->process->idle_event)
set_event( current->process->idle_event );
@@ -239,7 +239,7 @@ index 3845a86c962..ed5ebf6996e 100644
if (get_win == -1 && current->process->idle_event) set_event( current->process->idle_event );
SHARED_WRITE_BEGIN( queue_shm, queue_shm_t )
@@ -3454,6 +3478,13 @@ DECL_HANDLER(get_message)
@@ -3453,6 +3477,13 @@ DECL_HANDLER(get_message)
reset_queue_sync( queue );
set_error( STATUS_PENDING ); /* FIXME */
@@ -253,7 +253,7 @@ index 3845a86c962..ed5ebf6996e 100644
}
@@ -3471,7 +3502,10 @@ DECL_HANDLER(reply_message)
@@ -3470,7 +3501,10 @@ DECL_HANDLER(reply_message)
DECL_HANDLER(accept_hardware_message)
{
if (current->queue)
@@ -265,5 +265,5 @@ index 3845a86c962..ed5ebf6996e 100644
set_error( STATUS_ACCESS_DENIED );
}
--
2.47.2
2.50.1

View File

@@ -1,190 +0,0 @@
From fb57e3e8a5f16dc50f29e089595132c3c8b1b1a6 Mon Sep 17 00:00:00 2001
From: Francis De Brabandere <francisdb@gmail.com>
Date: Mon, 23 Dec 2024 18:34:04 +0100
Subject: [PATCH 1/3] vbscript: redim without dim
---
dlls/vbscript/compile.c | 7 +++++++
dlls/vbscript/interp.c | 25 ++++++++++++++++++++++---
dlls/vbscript/tests/lang.vbs | 27 +++++++++++++++++++++++++++
dlls/vbscript/vbscript_defs.h | 1 +
4 files changed, 57 insertions(+), 3 deletions(-)
diff --git a/dlls/vbscript/compile.c b/dlls/vbscript/compile.c
index baddc51d7e4..d2260aedb6e 100644
--- a/dlls/vbscript/compile.c
+++ b/dlls/vbscript/compile.c
@@ -1173,6 +1173,13 @@ static HRESULT compile_redim_statement(compile_ctx_t *ctx, redim_statement_t *st
HRESULT hres;
while(1) {
+ for (function_decl_t *func = ctx->func_decls; func; func = func->next) {
+ if (!wcsicmp(func->name, decl->identifier)) {
+ /* compilation error: Name redefined */
+ return MAKE_VBSERROR(VBS_COMPILE_ERROR);
+ }
+ }
+
hres = compile_args(ctx, decl->dims, &arg_cnt);
if(FAILED(hres))
return hres;
diff --git a/dlls/vbscript/interp.c b/dlls/vbscript/interp.c
index 937cdaf1c8c..32cf90971a7 100644
--- a/dlls/vbscript/interp.c
+++ b/dlls/vbscript/interp.c
@@ -1316,9 +1316,28 @@ static HRESULT interp_redim(exec_ctx_t *ctx)
return hres;
}
- if(ref.type != REF_VAR) {
- FIXME("got ref.type = %d\n", ref.type);
- return E_FAIL;
+ switch(ref.type) {
+ case REF_DISP:
+ case REF_OBJ:
+ case REF_CONST:
+ return MAKE_VBSERROR(VBSE_ILLEGAL_ASSIGNMENT);
+
+ case REF_FUNC:
+ /* Unreachable: Compiler should have thrown a compilation error: Name redefined */
+ return E_FAIL;
+
+ case REF_NONE:
+ ref.type = REF_VAR;
+ hres = add_dynamic_var(ctx, identifier, FALSE, &ref.u.v);
+ /* Fall through to REF_VAR case */
+
+ case REF_VAR:
+ /* all ok */
+ break;
+
+ default:
+ FIXME("!!!!!!got ref.type = %d\n", ref.type);
+ return E_FAIL;
}
v = ref.u.v;
diff --git a/dlls/vbscript/tests/lang.vbs b/dlls/vbscript/tests/lang.vbs
index 3c6ce656f1c..023af27f939 100644
--- a/dlls/vbscript/tests/lang.vbs
+++ b/dlls/vbscript/tests/lang.vbs
@@ -1701,6 +1701,33 @@ e = err.number
on error goto 0
ok e = 9, "e = " & e ' VBSE_OUT_OF_BOUNDS, can only change rightmost dimension
+' Redim without Dim should work, even in explicit mode
+redim toCreateArr(3)
+ok ubound(toCreateArr) = 3, "ubound(toCreateArr) = " & ubound(toCreateArr)
+toCreateArr(3) = 10
+ok toCreateArr(3) = 10, "toCreateArr(3) = " & toCreateArr(3)
+
+on error resume next
+const redimConst = 3
+redim redimConst(3)
+' REF_CONST -> runtime error: Type mismatch: 'redimConst'
+ok err.number = 501, "redim <const> err.number = " & err.number
+err.clear
+redim err(3)
+' REF_DISP -> runtime error: Object doesn't support this property or method
+ok err.number = 501, "redim <err> err.number = " & err.number
+err.clear
+' TODO where should we put this compilation error test?
+' Sub redimSub
+' End Sub
+' redim redimSub(3)
+' ' REF_FUNC -> compilation error: Name redefined
+' todo_wine_ok err.number = -1, "redim <sub> err.number = " & err.number
+' err.clear
+' ' TODO how do we test the REF_OBJ case?
+on error goto 0
+
+
sub TestReDimFixed
on error resume next
diff --git a/dlls/vbscript/vbscript_defs.h b/dlls/vbscript/vbscript_defs.h
index 139b71255a0..c32a94c7e85 100644
--- a/dlls/vbscript/vbscript_defs.h
+++ b/dlls/vbscript/vbscript_defs.h
@@ -267,6 +267,7 @@
#define VBSE_INVALID_DLL_FUNCTION_NAME 453
#define VBSE_INVALID_TYPELIB_VARIABLE 458
#define VBSE_SERVER_NOT_FOUND 462
+#define VBSE_ILLEGAL_ASSIGNMENT 501
#define VBSE_UNQUALIFIED_REFERENCE 505
#define VBS_COMPILE_ERROR 4096
--
GitLab
From 39b5672f5b4f41097229ddf9ba72061b56537a70 Mon Sep 17 00:00:00 2001
From: Francis De Brabandere <francisdb@gmail.com>
Date: Wed, 8 Jan 2025 17:59:49 +0100
Subject: [PATCH 2/3] vbscript: trying test the compile error
---
dlls/vbscript/tests/run.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/dlls/vbscript/tests/run.c b/dlls/vbscript/tests/run.c
index 8aaafbedf54..3d2ad2a6e7b 100644
--- a/dlls/vbscript/tests/run.c
+++ b/dlls/vbscript/tests/run.c
@@ -2765,6 +2765,18 @@ static void test_parse_errors(void)
" throwInt &h87001234&\n"
"end if\n",
2, 1
+ },
+ {
+ /* redim of sub on windows fails with
+ compilation error: Name redefined
+ TODO how can we validate that this code throws a "compilation error: Name redefined"?
+ TODO this code fails even without the compile.c redim collision check???
+ but somehow the commented part in lang.vbs would not fail???
+ */
+ "sub redimSub\n"
+ "end sub\n"
+ L"redim redimSub(3)\n",
+ 2, 0
}
};
HRESULT hres;
--
GitLab
From 9b72ec47965d17d93475651f0d2dafa598133c1f Mon Sep 17 00:00:00 2001
From: Francis De Brabandere <francisdb@gmail.com>
Date: Wed, 8 Jan 2025 18:01:48 +0100
Subject: [PATCH 3/3] vbscript: trying test the compile error
---
dlls/vbscript/tests/run.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/vbscript/tests/run.c b/dlls/vbscript/tests/run.c
index 3d2ad2a6e7b..89c73d51fdb 100644
--- a/dlls/vbscript/tests/run.c
+++ b/dlls/vbscript/tests/run.c
@@ -2767,12 +2767,12 @@ static void test_parse_errors(void)
2, 1
},
{
- /* redim of sub on windows fails with
+ /* redim of sub on windows fails with
compilation error: Name redefined
- TODO how can we validate that this code throws a "compilation error: Name redefined"?
- TODO this code fails even without the compile.c redim collision check???
- but somehow the commented part in lang.vbs would not fail???
- */
+ TODO how can we validate that this code throws a "compilation error: Name redefined"?
+ TODO this code fails even without the compile.c redim collision check???
+ but somehow the commented part in lang.vbs would not fail???
+ */
"sub redimSub\n"
"end sub\n"
L"redim redimSub(3)\n",
--
GitLab

View File

@@ -1,4 +0,0 @@
Fixes: [53644] vbscript: class single line multivar.
# MR
# https://gitlab.winehq.org/wine/wine/-/merge_requests/7068

View File

@@ -1 +1 @@
fc70990d579a74974c6e4f1550f892188114f5cf
8da914b27c9939ecf511001bcac1a6c74e7edde0