Alexandre Julliard
ba1495f7c2
ntdll: Avoid using wine_dll_enum_load_path() from libwine.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-27 12:35:39 +02:00
Alexandre Julliard
3e0c90e4c7
ntdll: Avoid using wine_get_build/data_dir() from libwine.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-27 12:35:19 +02:00
Alexandre Julliard
9122bc1096
ntdll: Avoid using wine_get_user_name() from libwine.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-27 12:34:45 +02:00
Alexandre Julliard
73211637c1
ntdll: Avoid using wine_get_server_dir() from libwine.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-27 12:34:30 +02:00
Alexandre Julliard
e5030a4ac0
ntdll: Avoid using wine_get_config_dir() from libwine.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-27 12:34:07 +02:00
Rémi Bernon
daa120309e
server: Make sure pids/tids are multiples of four.
...
Street Fighter V unpacker relies on it when validating other processes
for its anti-debug checks, it uses (PID&0xfffffffc)>>2 as an array index
and then checks back indexes against PIDs, and terminates early if some
PIDs do not match.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-27 12:01:44 +02:00
Rémi Bernon
8bb684c63e
ntdll/tests: Test that ptids are multiples of four.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-27 12:01:40 +02:00
Zebediah Figura
ea753c384e
include: Rename the other In*OrderModuleList fields to In*OrderLinks for consistency.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-24 10:13:49 +02:00
Zebediah Figura
09db718d99
include: Rename BaseAddress to DllBase.
...
To match Microsoft's public definition.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-24 10:13:46 +02:00
Zebediah Figura
4b3e820e07
include: Rename InMemoryOrderModuleList to InMemoryOrderLinks.
...
To match Microsoft's public definition.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-24 10:13:43 +02:00
Zebediah Figura
feeb1c7c24
include: Rename LDR_MODULE to LDR_DATA_TABLE_ENTRY.
...
This name is used in Microsoft's public winternl.h.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-24 10:13:39 +02:00
Serge Gautherie
340bc136a7
ntdll: Reorder DECLSPEC_NORETURN on raise_status().
...
Signed-off-by: Serge Gautherie <winehq-git_serge_180711@gautherie.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-23 12:57:43 +02:00
Paul Gofman
b0d3b5b69c
ntdll: Return STATUS_PENDING from NtReadFile() for async read in case of EOF.
...
Fixes crashes in "Planet Zoo" during character or game save.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-23 12:55:32 +02:00
Martin Storsjo
ea9f47a767
ntdll: Properly return errors when failing to unwind.
...
If libunwind is unavailable, make libunwind_virtual_unwind return an
error. Likewise if there was no PE exception info and we didn't try
unwinding using libunwind, we need to return an error when realizing
we were unable to unwind, instead of just warning and returning
success.
This fixes hangs/infinite loops on crashes when unwinding fails.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-22 17:23:39 +02:00
Jacek Caban
c4dab9b76e
server: Block by waiting on context handle in get_thread_context.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48052
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45546
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-22 16:47:41 +02:00
Jacek Caban
aa0c4bb5e7
server: Don't wait for client thread to enter suspended state in set_thread_context.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-22 16:47:41 +02:00
Alexandre Julliard
d2b70aa57a
ntdll: Add a helper function to allocate module dependencies.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-22 16:02:10 +02:00
Alexandre Julliard
68e675d73d
ntdll: The builtin load callback is no longer used for ntdll itself.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-22 15:51:23 +02:00
Alexandre Julliard
6f4272ce3e
ntdll: Call TLS callbacks also for the main exe.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48971
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-22 14:14:40 +02:00
Alexandre Julliard
62807be8c9
makefiles: Explicitly import libwine where necessary.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-21 12:00:08 +02:00
Alexandre Julliard
3872dc55ef
ntdll: Support loading ntdll without a constructor.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-21 11:27:11 +02:00
Alexandre Julliard
0a72ec1dac
ntdll: Make sure we don't try to attach the main exe a second time.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48961
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-21 11:23:15 +02:00
Alexandre Julliard
abb33fb90e
ntdll: Also ignore missing directories in NtGetNlsSectionPtr().
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48966
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-20 20:54:21 +02:00
Alexandre Julliard
fecaa443b5
ntdll: Don't abort directory search in single entry mode when a file is ignored.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48960
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-20 20:54:21 +02:00
Sven Baars
1cfaf1425a
ntdll: Fix a memory leak in fork_and_exec.
...
Signed-off-by: Sven Baars <sbaars@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-20 17:19:11 +02:00
Sven Baars
9ce4383128
ntdll: Fix a string leak in init_user_process_params (Valgrind).
...
Signed-off-by: Sven Baars <sbaars@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-20 12:49:11 +02:00
Gerald Pfeifer
973138c068
ntdll: Fix call_constructor build on FreeBSD.
...
Signed-off-by: Gerald Pfeifer <gerald@pfeifer.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-20 12:49:11 +02:00
Jacek Caban
eaad238000
ntdll: Leave critical section before blocking in RtlWaitOnAddress.
...
Fixes regression from commit 4f673d5386
.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-20 12:38:05 +02:00
Jacek Caban
7a1069e9bd
ntdll: Remove APC handling from RtlWaitOnAddress.
...
It uses non-alertable wait anyway.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-20 12:36:40 +02:00
Alistair Leslie-Hughes
ccce5f769d
ntdll: Correct compile error under macos.
...
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-17 14:15:13 +02:00
Jacek Caban
7f9eb22af8
ntdll: Use server_select to pass context to server in send_debug_event.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-16 22:10:04 +02:00
Jacek Caban
137fd7d3a0
ntdll: Block signals in send_debug_event.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-16 22:10:04 +02:00
Jacek Caban
96cc6950f0
ntdll: Use select request instead of get_suspend_context to transfer context back to client.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-16 22:10:04 +02:00
Jacek Caban
5e7ccd182e
ntdll: Use select request to pass suspend context to server.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-16 22:10:04 +02:00
Jacek Caban
e70b684ded
server: Allow passing suspend context in select request.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-16 22:10:04 +02:00
Alexandre Julliard
52bf0fbd47
ntdll: Export Unix user name in WINEUSERNAME variable.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-16 22:10:04 +02:00
Alexandre Julliard
081c8e1c73
ntdll: Execute .so constructors during module initialization.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-16 22:10:03 +02:00
Alexandre Julliard
3935acd4da
ntdll: Use a Wine-specific field in WINE_MODREF for the .so handle.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-16 22:10:03 +02:00
Alexandre Julliard
0a3e42e271
ntdll: Load .so builtin modules without using libwine.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-16 22:10:03 +02:00
Alexandre Julliard
6ac357667e
ntdll: Support loading builtin modules that don't use a constructor.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-15 19:50:21 +02:00
Jacek Caban
b66e13ef24
kernelbase: Implement CreateThreadpoolIo.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-15 11:40:49 +02:00
Alexandre Julliard
a55feef63a
ntdll: Always use the loaded path as builtin module file name.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-14 22:04:07 +02:00
Alexandre Julliard
19c48204bb
ntdll: Allow the module file name to not be null-terminated.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-14 21:59:19 +02:00
Alexandre Julliard
fd7992972b
ntdll: Don't call entry point for the main process so that we don't need to check the dll flag.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48817
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-14 12:55:38 +02:00
Zebediah Figura
a6e70c6074
ntdll: Handle unaligned SRW locks when using futexes.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-14 11:23:04 +02:00
Zebediah Figura
28619e6035
ntdll: Handle unaligned SRW locks when using keyed events.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-14 11:23:02 +02:00
Zebediah Figura
aceff21022
ntdll: Handle unaligned condition variables when using futexes.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48389
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-14 11:22:59 +02:00
Jacek Caban
0308c9599d
ntdll: Directly use server_select in send_debug_event.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-13 12:15:00 +02:00
Jacek Caban
0ab9e00ef6
ntdll: Directly use server_select in wait_suspend.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-13 12:14:58 +02:00
Jacek Caban
4f673d5386
ntdll: Use server_select in RtlWaitOnAddress.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-13 12:14:55 +02:00