Skip to content

Commit

Permalink
Wine Staging 432c0b5, wine-tkg-git 6e3413a.
Browse files Browse the repository at this point in the history
  • Loading branch information
openglfreak committed Jun 19, 2021
1 parent 2ec8405 commit ff6328a
Show file tree
Hide file tree
Showing 6 changed files with 316 additions and 101 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ index 59c5d040f4e..a34b22f7298 100644

/* ### protocol_version begin ### */

-#define SERVER_PROTOCOL_VERSION 714
+#define SERVER_PROTOCOL_VERSION 715
-#define SERVER_PROTOCOL_VERSION 715
+#define SERVER_PROTOCOL_VERSION 716

/* ### protocol_version end ### */

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ diff --git a/include/wine/server_protocol.h b/include/wine/server_protocol.h
index a0acbf9deb7..de9fdcf0347 100644
--- a/include/wine/server_protocol.h
+++ b/include/wine/server_protocol.h
@@ -1810,6 +1810,21 @@ struct set_socket_deferred_reply
@@ -1810,6 +1810,21 @@ struct send_socket_reply



Expand All @@ -40,35 +40,35 @@ index a0acbf9deb7..de9fdcf0347 100644
{
struct request_header __header;
@@ -5661,6 +5676,7 @@ enum request
REQ_get_socket_info,
REQ_enable_socket_event,
REQ_set_socket_deferred,
+ REQ_get_console_process_list,
REQ_recv_socket,
REQ_poll_socket,
REQ_send_socket,
+ REQ_get_console_process_list,
REQ_get_next_console_request,
REQ_read_directory_changes,
REQ_read_change,
@@ -5956,6 +5972,7 @@ union generic_request
struct get_socket_info_request get_socket_info_request;
struct enable_socket_event_request enable_socket_event_request;
struct set_socket_deferred_request set_socket_deferred_request;
+ struct get_console_process_list_request get_console_process_list_request;
struct recv_socket_request recv_socket_request;
struct poll_socket_request poll_socket_request;
struct send_socket_request send_socket_request;
+ struct get_console_process_list_request get_console_process_list_request;
struct get_next_console_request_request get_next_console_request_request;
struct read_directory_changes_request read_directory_changes_request;
struct read_change_request read_change_request;
@@ -6249,6 +6266,7 @@ union generic_reply
struct get_socket_info_reply get_socket_info_reply;
struct enable_socket_event_reply enable_socket_event_reply;
struct set_socket_deferred_reply set_socket_deferred_reply;
+ struct get_console_process_list_reply get_console_process_list_reply;
struct recv_socket_reply recv_socket_reply;
struct poll_socket_reply poll_socket_reply;
struct send_socket_reply send_socket_reply;
+ struct get_console_process_list_reply get_console_process_list_reply;
struct get_next_console_request_reply get_next_console_request_reply;
struct read_directory_changes_reply read_directory_changes_reply;
struct read_change_reply read_change_reply;
@@ -6482,7 +6500,7 @@ union generic_reply

/* ### protocol_version begin ### */

-#define SERVER_PROTOCOL_VERSION 715
+#define SERVER_PROTOCOL_VERSION 716
-#define SERVER_PROTOCOL_VERSION 716
+#define SERVER_PROTOCOL_VERSION 717

/* ### protocol_version end ### */

Expand Down Expand Up @@ -97,38 +97,38 @@ index d5aeea15054..e2fc7d7ff52 100644
--- a/server/request.h
+++ b/server/request.h
@@ -178,6 +178,7 @@ DECL_HANDLER(get_socket_event);
DECL_HANDLER(get_socket_info);
DECL_HANDLER(enable_socket_event);
DECL_HANDLER(set_socket_deferred);
+DECL_HANDLER(get_console_process_list);
DECL_HANDLER(recv_socket);
DECL_HANDLER(poll_socket);
DECL_HANDLER(send_socket);
+DECL_HANDLER(get_console_process_list);
DECL_HANDLER(get_next_console_request);
DECL_HANDLER(read_directory_changes);
DECL_HANDLER(read_change);
@@ -472,6 +473,7 @@ static const req_handler req_handlers[REQ_NB_REQUESTS] =
(req_handler)req_get_socket_info,
(req_handler)req_enable_socket_event,
(req_handler)req_set_socket_deferred,
+ (req_handler)req_get_console_process_list,
(req_handler)req_recv_socket,
(req_handler)req_poll_socket,
(req_handler)req_send_socket,
+ (req_handler)req_get_console_process_list,
(req_handler)req_get_next_console_request,
(req_handler)req_read_directory_changes,
(req_handler)req_read_change,
@@ -1098,6 +1100,10 @@ C_ASSERT( sizeof(struct enable_socket_event_request) == 32 );
C_ASSERT( FIELD_OFFSET(struct set_socket_deferred_request, deferred) == 16 );
C_ASSERT( sizeof(struct set_socket_deferred_request) == 24 );
C_ASSERT( FIELD_OFFSET(struct recv_socket_request, oob) == 12 );
C_ASSERT( FIELD_OFFSET(struct send_socket_reply, wait) == 8 );
C_ASSERT( FIELD_OFFSET(struct send_socket_reply, options) == 12 );
C_ASSERT( sizeof(struct send_socket_reply) == 16 );
+C_ASSERT( FIELD_OFFSET(struct get_console_process_list_request, count) == 12 );
+C_ASSERT( sizeof(struct get_console_process_list_request) == 16 );
+C_ASSERT( FIELD_OFFSET(struct get_console_process_list_reply, total) == 8 );
+C_ASSERT( sizeof(struct get_console_process_list_reply) == 16 );
C_ASSERT( FIELD_OFFSET(struct recv_socket_request, async) == 16 );
C_ASSERT( FIELD_OFFSET(struct recv_socket_request, status) == 56 );
C_ASSERT( FIELD_OFFSET(struct recv_socket_request, total) == 60 );
C_ASSERT( FIELD_OFFSET(struct get_next_console_request_request, handle) == 12 );
C_ASSERT( FIELD_OFFSET(struct get_next_console_request_request, signal) == 16 );
C_ASSERT( FIELD_OFFSET(struct get_next_console_request_request, read) == 20 );
diff --git a/server/trace.c b/server/trace.c
index 71248054c08..ea475ca38c8 100644
--- a/server/trace.c
+++ b/server/trace.c
@@ -2027,6 +2027,17 @@ static void dump_set_socket_deferred_request( const struct set_socket_deferred_r
fprintf( stderr, ", deferred=%04x", req->deferred );
@@ -2027,6 +2027,17 @@ static void dump_send_socket_reply( const struct send_socket_reply *req )
fprintf( stderr, ", options=%08x", req->options );
}

+static void dump_get_console_process_list_request( const struct get_console_process_list_request *req )
Expand All @@ -146,26 +146,26 @@ index 71248054c08..ea475ca38c8 100644
{
fprintf( stderr, " handle=%04x", req->handle );
@@ -4591,6 +4602,7 @@ static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
(dump_func)dump_get_socket_info_request,
(dump_func)dump_enable_socket_event_request,
(dump_func)dump_set_socket_deferred_request,
+ (dump_func)dump_get_console_process_list_request,
(dump_func)dump_recv_socket_request,
(dump_func)dump_poll_socket_request,
(dump_func)dump_send_socket_request,
+ (dump_func)dump_get_console_process_list_request,
(dump_func)dump_get_next_console_request_request,
(dump_func)dump_read_directory_changes_request,
(dump_func)dump_read_change_request,
@@ -4882,6 +4894,7 @@ static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
(dump_func)dump_get_socket_info_reply,
NULL,
NULL,
+ (dump_func)dump_get_console_process_list_reply,
(dump_func)dump_recv_socket_reply,
(dump_func)dump_poll_socket_reply,
(dump_func)dump_send_socket_reply,
+ (dump_func)dump_get_console_process_list_reply,
(dump_func)dump_get_next_console_request_reply,
NULL,
(dump_func)dump_read_change_reply,
@@ -5173,6 +5186,7 @@ static const char * const req_names[REQ_NB_REQUESTS] = {
"get_socket_info",
"enable_socket_event",
"set_socket_deferred",
+ "get_console_process_list",
"recv_socket",
"poll_socket",
"send_socket",
+ "get_console_process_list",
"get_next_console_request",
"read_directory_changes",
"read_change",

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,33 +1,26 @@
From: "Rémi Bernon" <rbernon@codeweavers.com>
Subject: [PATCH] winebuild: Clear RFLAGS before entering syscall.
Message-Id: <20210601084301.2074741-1-rbernon@codeweavers.com>
Date: Tue, 1 Jun 2021 10:43:01 +0200
commit c9dc803a0abbf4ea5106fd4607bb9e09928c5d8c
Author: Rémi Bernon <rbernon@codeweavers.com>
Date: Mon May 31 16:12:07 2021 +0200

We pushed the flags, but kept them set. Far Cry sets NT flags, which
causes later iretd instruction to raise a GP fault exception.

This fixes a regression from e341d1f695311725752c287057f6c6ab60fdf2a3.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50793
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
---
tools/winebuild/import.c | 2 ++
1 file changed, 2 insertions(+)
winebuild: Clear RFLAGS before entering syscall.

We pushed the flags, but kept them set. Far Cry sets NT flags, which
causes later iretd instruction to raise a GP fault exception.

This fixes a regression from e341d1f695311725752c287057f6c6ab60fdf2a3.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50793

diff --git a/tools/winebuild/import.c b/tools/winebuild/import.c
index b745f16db42..ad773e2a0d9 100644
index a194ae50104..ddd7b261d89 100644
--- a/tools/winebuild/import.c
+++ b/tools/winebuild/import.c
@@ -1447,6 +1447,8 @@ static void output_syscall_dispatcher( int count, const char *variant )
@@ -1437,6 +1437,8 @@ static void output_syscall_dispatcher(void)
output( "\tmovl $0,0x00(%%ecx)\n" ); /* frame->restore_flags */
output( "\tpopl 0x08(%%ecx)\n" ); /* frame->eip */
output( "\tpushfl\n" );
output( "\tpopl 0x04(%%ecx)\n" ); /* frame->eflags */
+ output( "\tpushl $0x202\n" );
+ output( "\tpopfl\n" );
output( "\tpopl 0x04(%%ecx)\n" ); /* frame->eflags */
output( "%s\n", asm_globl("__wine_syscall_dispatcher_prolog_end") );
output( "\tmovl %%esp,0x0c(%%ecx)\n" ); /* frame->esp */
output( "\tmovw %%cs,0x10(%%ecx)\n" );

--
2.31.0

Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
From: Akihiro Sagawa <sagawa.aki@gmail.com>
Subject: [PATCH 1/2] ntdll/tests: Expand path name tests with path + device name.
Message-Id: <20210619182511.F926.375B48EC@gmail.com>
Date: Sat, 19 Jun 2021 18:25:33 +0900

Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
---
dlls/ntdll/tests/path.c | 44 +++++++++++++++++++++++------------------
1 file changed, 25 insertions(+), 19 deletions(-)

diff --git a/dlls/ntdll/tests/path.c b/dlls/ntdll/tests/path.c
index f2588c0bd98..74ad971392c 100644
--- a/dlls/ntdll/tests/path.c
+++ b/dlls/ntdll/tests/path.c
@@ -317,6 +317,11 @@ static void test_RtlGetFullPathName_U(void)
{ "...", "C:\\windows\\", NULL},
{ "./foo", "C:\\windows\\foo", "foo"},
{ "foo/..", "C:\\windows", "windows"},
+ { "\\windows\\nul", "\\\\.\\nul", NULL},
+ { "C:\\nonexistent\\nul", "\\\\.\\nul", NULL},
+ { "C:\\con\\con", "\\\\.\\con", NULL},
+ { "C:NUL.", "\\\\.\\NUL", NULL},
+ { "C:NUL", "\\\\.\\NUL", NULL},
{ "AUX", "\\\\.\\AUX", NULL},
{ "COM1", "\\\\.\\COM1", NULL},
{ "?<>*\"|:", "C:\\windows\\?<>*\"|:", "?<>*\"|:"},
@@ -471,6 +476,9 @@ static void test_RtlDosPathNameToNtPathName_U(void)
{L"...", L"\\??\\C:\\windows\\", -1},
{L"./foo", L"\\??\\C:\\windows\\foo", 15},
{L"foo/..", L"\\??\\C:\\windows", 7},
+ {L"\\windows\\nul", L"\\??\\nul", -1},
+ {L"C:NUL.", L"\\??\\NUL", -1},
+ {L"C:NUL", L"\\??\\NUL", -1},
{L"AUX" , L"\\??\\AUX", -1},
{L"COM1" , L"\\??\\COM1", -1},
{L"?<>*\"|:", L"\\??\\C:\\windows\\?<>*\"|:", 15},
@@ -551,32 +559,30 @@ static void test_RtlDosPathNameToNtPathName_U(void)
{L"cOnOuT$", L"\\??\\cOnOuT$", -1, L"\\??\\C:\\windows\\cOnOuT$" /* winxp */ },
{L"CONERR$", L"\\??\\C:\\windows\\CONERR$", 15},
};
+ static const WCHAR *error_paths[] = {
+ NULL, L"", L" ", L"C:\\nonexistent\\nul", L"C:\\con\\con"
+ };

GetCurrentDirectoryA(sizeof(curdir), curdir);
SetCurrentDirectoryA("C:\\windows\\");

- ret = pRtlDosPathNameToNtPathName_U(NULL, &nameW, &file_part, NULL);
- ok(!ret, "Got %d.\n", ret);
-
- ret = pRtlDosPathNameToNtPathName_U(L"", &nameW, &file_part, NULL);
- ok(!ret, "Got %d.\n", ret);
-
- ret = pRtlDosPathNameToNtPathName_U(L" ", &nameW, &file_part, NULL);
- ok(!ret, "Got %d.\n", ret);
-
- if (pRtlDosPathNameToNtPathName_U_WithStatus)
+ for (i = 0; i < ARRAY_SIZE(error_paths); ++i)
{
- status = pRtlDosPathNameToNtPathName_U_WithStatus(NULL, &nameW, &file_part, NULL);
- ok(status == STATUS_OBJECT_NAME_INVALID || status == STATUS_OBJECT_PATH_NOT_FOUND /* 2003 */,
- "Got status %#x.\n", status);
+ winetest_push_context("%s", debugstr_w(error_paths[i]));

- status = pRtlDosPathNameToNtPathName_U_WithStatus(L"", &nameW, &file_part, NULL);
- ok(status == STATUS_OBJECT_NAME_INVALID || status == STATUS_OBJECT_PATH_NOT_FOUND /* 2003 */,
- "Got status %#x.\n", status);
+ ret = pRtlDosPathNameToNtPathName_U(error_paths[i], &nameW, &file_part, NULL);
+ todo_wine_if(i == 3 || i == 4)
+ ok(!ret, "Got %d.\n", ret);
+
+ if (pRtlDosPathNameToNtPathName_U_WithStatus)
+ {
+ status = pRtlDosPathNameToNtPathName_U_WithStatus(error_paths[i], &nameW, &file_part, NULL);
+ todo_wine_if(i == 3 || i == 4)
+ ok(status == STATUS_OBJECT_NAME_INVALID || broken(status == STATUS_OBJECT_PATH_NOT_FOUND /* 2003 */),
+ "Got status %#x.\n", status);
+ }

- status = pRtlDosPathNameToNtPathName_U_WithStatus(L" ", &nameW, &file_part, NULL);
- ok(status == STATUS_OBJECT_NAME_INVALID || status == STATUS_OBJECT_PATH_NOT_FOUND /* 2003 */,
- "Got status %#x.\n", status);
+ winetest_pop_context();
}

for (i = 0; i < ARRAY_SIZE(tests); ++i)

Loading

0 comments on commit ff6328a

Please sign in to comment.