Commit Graph

4811 Commits

Author SHA1 Message Date
Jacek Caban 93d1eecb6a ntdll: Export _chkstk from importlib.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-05 20:53:02 +02:00
Alexandre Julliard a10f1e9d7b kernel32: Move FlushProcessWriteBuffers() stub to ntdll.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-05 20:53:02 +02:00
Zebediah Figura 74f820fccc ntdll: Export RtlCopyMemoryNonTemporal.
Needed by Blindwrite 7's kernel driver.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-04 12:39:09 +02:00
Alexandre Julliard 39e4b788d6 ntdll: Use the standard Interlocked* functions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-02 15:10:04 +02:00
Gijs Vermeulen d8ec1fb894 ntdll: Remove unused function fast_wait_cv().
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-01 22:03:16 +02:00
Alexandre Julliard 2af035f53f ntdll: Remove support for custom virtual memory alignments.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-30 12:37:27 +02:00
Alexandre Julliard dee934c0ff ntdll: Allocate TEBs out of a larger memory block.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-30 12:37:27 +02:00
Alexandre Julliard 5dcb9ddff7 ntdll: Get rid of obsolete KERN_THALTSTACK sysctl.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-30 12:37:27 +02:00
Alexandre Julliard 53b305c35e ntdll: Use server_enter_uninterrupted_section() for LDT locking.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-29 19:53:57 +02:00
Alexandre Julliard bd9a1e23f2 ntdll: Move TEB allocation to the common code.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-28 14:03:26 +02:00
Alexandre Julliard 9650f1d3a1 ntdll: Move signal stack size computation to the common code.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-28 13:34:06 +02:00
Alexandre Julliard ffb7c595c6 ntdll: Add a helper for platform-specific threading initialization.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-28 13:17:07 +02:00
Alexandre Julliard 69f068bfb1 ntdll: Remove VFAT_IOCTL_READDIR_BOTH kernel bugs workarounds.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-28 12:33:11 +02:00
Alexandre Julliard 6b4de51027 ntdll: Don't use a custom alignment for large heap blocks.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-28 12:33:11 +02:00
Alexandre Julliard f5f1737456 ntdll: Store the pending free list in the main process heap.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-28 12:33:11 +02:00
Alexandre Julliard 9fd2330a96 ntdll: Add a helper to exec wineloader.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-28 11:28:29 +02:00
Alexandre Julliard 68a425b19c ntdll: Add a helper to exec wineserver.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-28 11:28:25 +02:00
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