Commit Graph

1352 Commits

Author SHA1 Message Date
Alexandre Julliard a8ff0c12f4 ntdll: Allocate a separate 64-bit stack for Wow64 threads.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-17 18:49:09 +02:00
Alexandre Julliard 5864bc88de ntdll: Always send the native PEB pointer to the server.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-13 16:45:28 +02:00
Alexandre Julliard 4dca2cc797 ntdll: Always send the native TEB pointer to the server.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-13 16:45:28 +02:00
Alexandre Julliard c2be6ecf0b ntdll/tests: Add tests for Wow64 TEB and PEB information.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-13 16:45:28 +02:00
Alexandre Julliard d1e90e1537 ntdll/tests: Don't skip all tests if a function is missing.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-13 16:45:28 +02:00
Alexandre Julliard e97a2c4c0f ntdll: Implement RtlWow64GetCpuAreaInfo().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-12 16:56:27 +02:00
Rémi Bernon b44fb883b0 ntdll/tests: Check that creating huge thread stacks works.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-07 22:22:49 +02:00
Alexandre Julliard 40165dfa58 ntdll: RtlCreateUserThread() also takes a zero_bits parameter.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-07 22:22:49 +02:00
Francois Gouget c021db5a41 ntdll/tests: Fix the speilling of an ok() message.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-06 19:49:54 +02:00
Alexandre Julliard 87b7132b37 ntdll: Implement RtlFindExportedRoutineByName().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-05 21:52:22 +02:00
Sven Baars fc8bf8d33d ntdll/tests: Use FindClose() to close handles returned by FindFirstFileW() (Valgrind).
Signed-off-by: Sven Baars <sbaars@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-03 20:42:29 +02:00
Alexandre Julliard 7cdb88a5d8 include: Update the SYSTEM_PROCESS_INFORMATION structure.
Spotted by Alex Henrie.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-30 22:59:50 +02:00
Rémi Bernon 24d2a65916 ntdll/tests: Remove Qpc(Interrupt|System)TimeIncrement(Shift) checks.
They are not fixed and are updated from time to time (every few secs),
randomly failing the tests on the testbot.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-29 23:37:45 +02:00
Alexandre Julliard 4f8ede8e76 ntdll: Implement RtlWow64IsWowGuestMachineSupported().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-29 23:37:45 +02:00
Alexandre Julliard 6c2f19c0a7 ntdll: Implement RtlWow64GetCurrentMachine().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-29 23:37:45 +02:00
Alexandre Julliard f2c1470c7c ntdll: Implement RtlWow64GetProcessMachines().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-29 23:37:45 +02:00
Alexandre Julliard b5095a1028 ntdll/tests: Fix a test failure on Windows 8.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-29 23:37:45 +02:00
Paul Gofman 02e3327f06 ntdll: Implement NtGetNextThread().
Largely based on a patch by Nikolay Sivov for NtGetNextProcess().

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-29 10:48:59 +02:00
Alexandre Julliard 6a9e19344d ntdll: Always allocate space for both 32- and 64-bit TEB.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-27 16:52:30 +02:00
Gabriel Ivăncescu ec20f767fb ntdll/tests: Test hard linking a file to a different casing of itself or existing target.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-23 20:02:07 +02:00
Alexandre Julliard 126a14ac9a ntdll: Implement NtQuerySystemInformationEx(SystemSupportedProcessorArchitectures).
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-23 20:02:06 +02:00
Gijs Vermeulen 2f2cdc8bb1 ntdll: Don't fail when trying to remove the value of a non-existant variable in RtlSetEnvironmentVariable().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51035
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-21 22:11:27 +02:00
Gijs Vermeulen 09879590cb ntdll/tests: Refactor RtlSetEnvironmentVariable() tests.
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-21 22:11:27 +02:00
Rémi Bernon 94dcca8a0e ntdll/tests: Add committed / reserved thread stack sizes tests.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-21 09:35:04 +02:00
Gijs Vermeulen 749f8c25e2 ntdll: Return STATUS_INFO_LENGTH_MISMATCH when len is too small in NtQueryObject(ObjectBasicInformation).
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50791
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-16 22:39:46 +02:00
Alexandre Julliard a0b77d7151 ntdll/tests: Add some file system redirection tests.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-15 17:30:50 +02:00
Alexandre Julliard 060b28b9ba ntdll: Allow a second backslash after the drive letter.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-14 17:04:35 +02:00
Alexandre Julliard 405666b736 ntdll: Reject NT path names that are not in canonical form.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-13 13:05:29 +02:00
Michael Stefaniuc 8163dcb6c8 ntdll/tests: Remove superfluous casts to self.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-09 20:37:14 +02:00
Alexandre Julliard afaf35b9e1 include: Add more SYSTEM_INFORMATION_CLASS definitions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-30 17:10:03 +02:00
Paul Gofman 084519a82b ntdll: Implement NtQuerySystemInformationEx(SystemCpuSetInformation).
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-30 17:10:03 +02:00
Zebediah Figura 195c57eeb7 ntdll: Report SegDs to be identical to SegSs in x86_64 exception handlers.
Based on a patch by Dávid Török.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47970
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-29 22:44:35 +02:00
Zebediah Figura 10d7a804c1 ntdll/tests: Add a test for segment register contents in x86_64 exception handlers.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-29 22:44:35 +02:00
Mark Harmstone 9ea1134eea ntdll: Add error mapping for MUI statuses.
Signed-off-by: Mark Harmstone <mark@harmstone.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-25 21:52:18 +01:00
Rémi Bernon d9d478e277 ntdll/tests: Add RtlQueryPerformanceCounter tests.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-19 19:55:34 +01:00
Rémi Bernon 97d2802d1b ntdll/tests: Add InterruptTimeBias to fix spurious test failures.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-15 22:22:19 +01:00
Rémi Bernon 8591c2ac1a ntdll/tests: Fix tick count read from user shared data.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-15 22:22:19 +01:00
Rafał Harabień 77481d36d3 ntdll: Allow getting/setting x86_64 context of x86 processes in wine64.
WoW64 process has two separate contexts:
- x86 context used most of the time (e.g. by application code)
- x86_64 context used by system when it quits x86 emulation and jumps to
  the kernel code
A notable exception are debug registers - their state is shared. Some
debuggers make use of that fact and sets/gets debug registers of x86
processes using x86_64 thread context.

Add support for setting and getting debug registers using x86_64
thread context. Getting other registers is allowed too and will return
values from x86 thread context.

Fixes hardware breakpoints in IDA 7.0 disassembler (x86_64 app) when
debugging x86 (32 bit) applications.

Signed-off-by: Rafał Harabień <rafalh92@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-09 21:33:43 +01:00
Rafał Harabień bee9f0126f ntdll/tests: Test getting/setting x86_64 context of x86 processes in wine64.
Signed-off-by: Rafał Harabień <rafalh92@outlook.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-09 21:33:43 +01:00
Jacek Caban af74bd3122 ntdll: Use syscall dispatcher to restore context in NtSetContextThread.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-02 20:41:39 +01:00
Alexandre Julliard 4ef8e946f1 winebuild: Set Thumb bit in CPSR register on syscall entry.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-24 22:01:42 +01:00
Zebediah Figura db0fe33813 ntdll/tests: Avoid passing an uninitialized timeout to NtNotifyChangeKey().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-24 22:01:42 +01:00
Zebediah Figura 1f1d4da5f6 ntdll: Fill the handle attributes in System(Extended)HandleInformation.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-18 10:18:39 +01:00
Michael Müller 835f5fff71 ntdll: Implement NtQuerySystemInformation(SystemExtendedHandleInformation).
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-18 10:14:38 +01:00
Alexandre Julliard e941079126 ntdll: Reimplement local atom tables in user space.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-16 11:01:25 +01:00
Rémi Bernon 26ee9134d5 ntdll: Re-implement RtlRegisterWait using TpSetWait.
This adds several internal flags to TP_WAIT object to support the
implementation:

* WT_EXECUTEONLYONCE: waits are re-queued unless it is set.

* WT_EXECUTEINWAITTHREAD: call the callback in the wait thread when set.

* WT_EXECUTEINIOTHREAD: call alertable NtWaitForMultipleObjects in wait
  thread when set, as well the callback in the wait thread, as for
  WT_EXECUTEINWAITTHREAD. The worker threads use non-alertable waits
  otherwise.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47843
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-11 22:26:36 +01:00
Alexandre Julliard 7c85b365d1 ntdll/tests: Relax a broken result on Windows.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-11 16:31:30 +01:00
Rémi Bernon 6a45c160f4 ntdll/tests: Test RtlRegisterWait with WT_EXECUTEINWAITTHREAD flag.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47843
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-10 20:05:36 +01:00
Rémi Bernon bf846d05ed ntdll/tests: Remove traces from threadpool callbacks.
They seem to cause spurious failures.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47843
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-10 20:05:33 +01:00
Alexandre Julliard 27b9a2c621 ntdll/tests: Add some tests for NtQueryVirtualMemory(MemorySectionName).
Partly based on a patch by Dmitry Timoshkov.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-10 16:30:20 +01:00
Alexandre Julliard 52d733b5c4 server: Implement retrieving the debug object of a process.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-08 12:09:44 +01:00
Alexandre Julliard d4156d1da8 ntdll/tests: Add more tests for object types.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-05 22:53:46 +01:00
Sebastian Lackner 43de1407e9 ntdll: Return STATUS_INVALID_DEVICE_REQUEST when trying to call NtReadFile on directory.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-05 15:38:21 +01:00
Alexandre Julliard 85c52b397a ntdll/tests: Fix a couple of test failures on older Windows versions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-04 15:41:02 +01:00
Zebediah Figura f2f69a8799 ntdll/tests: Add more tests for RtlDosPathNameToNtPathName_U().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-03 09:14:19 +01:00
Zebediah Figura 32854b7ee3 ntdll/tests: Check the alternate NT path only if it is present.
Makes adding new tests a bit easier...

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-03 09:14:12 +01:00
Alexandre Julliard 451663cfb8 ntdll/tests: Add tests for a few more object types.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-02 13:46:37 +01:00
Alexandre Julliard d848a25b76 ntdll: Implement DbgUiConvertStateChangeStructure().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-01 11:39:06 +01:00
Alexandre Julliard 7bebf7db8c ntdll: Implement NtSetInformationDebugObject().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-01 11:10:06 +01:00
Sebastian Lackner 9c29cee638 server: Store and notify all notification events associated with a given registry handle.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-27 21:06:26 +01:00
Zebediah Figura 3c72ad33a9 ntdll/tests: Add more tests for registry notifications.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-27 21:05:01 +01:00
Alexandre Julliard 5ebc20c656 ntdll: Implement NtCreateDebugObject().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-27 11:23:11 +01:00
Alexandre Julliard dc90fe9a94 ntdll: Set the environment size in the process parameters.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50405
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-26 16:38:52 +01:00
Zebediah Figura 6ebf5ed093 ntdll/tests: Add an alignment helper.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-25 21:08:48 +01:00
Jacek Caban fadd22ed5a ntdll/tests: Don't assume 32-bit test module base.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-22 18:33:32 +01:00
Alexandre Julliard 7250f9a95b ntdll: Add some more section information data.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-22 18:33:23 +01:00
Daniel Lehman 6a971e8429 ntdll: Check event type on creation.
Signed-off-by: Daniel Lehman <dlehman25@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-21 20:46:13 +01:00
Nikolay Sivov b78285b9a3 ntdll/tests: Remove skips on missing ntdll.dll.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-20 22:10:50 +01:00
Daniel Lehman 37e00a8743 ntdll/tests: Fix error messages for mutant test.
Signed-off-by: Daniel Lehman <dlehman25@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-19 21:44:18 +01:00
Daniel Lehman c2daea89c4 ntdll/tests: Add tests for semaphores.
Signed-off-by: Daniel Lehman <dlehman25@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-18 22:46:37 +01:00
Rémi Bernon c414f232e6 server: Accept DBG_EXCEPTION_HANDLED parameter in continue_debug_event.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50453
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-06 20:18:50 +01:00
Jefferson Carpenter 93c4852620 ntdll/tests: Clear AC flag in align check test.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49771
Signed-off-by: Jefferson Carpenter <jeffersoncarpenter2@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-28 12:27:14 +01:00
Paul Gofman 175a3649ba ntdll: Always copy context in call_user_apc_dispatcher() on x86.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-22 21:25:34 +01:00
Paul Gofman 71a43335ab ntdll: Save unwind information in KiUserApcDispatcher() on x64.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-17 10:35:46 +01:00
Jacek Caban fcf545f449 winapi: Use __alignof__ on clang.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-16 15:30:07 +01:00
Francois Gouget 84907a9eb1 ntdll/tests: The case-sensitivity tests don't need write access.
This fixes the tests when missing elevated privileges.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-14 17:02:39 +01:00
Francois Gouget cbff1b9540 ntdll/tests: Skip some registry tests when missing elevated privileges.
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-14 17:02:39 +01:00
Paul Gofman 183a8cf380 ntdll: Restore non-volatile registers in call_user_exception_dispatcher() on x86_64.
Required to correctly restore non-volatile registers during unwind.

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-07 22:35:29 +01:00
Paul Gofman c073b1ad40 ntdll/tests: Add a broken result for Win7u in test_extended_context().
Fixes test failures on w7u testbot machines.

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-07 22:35:29 +01:00
Piotr Caban 7d94c4f0e4 ntdll: Fix memchr implementation.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50228
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-04 17:51:07 +01:00
Francois Gouget dcdd98f5c1 ntdll/tests: Don't check the load address in the WoW64 case.
It could sometimes be NULL, such as win32k.sys on Win <= 7.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-30 21:36:12 +01:00
Paul Gofman 44e135a7bd ntdll/tests: Test noname named pipe uniqueness.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-26 23:25:38 +01:00
Paul Gofman 1f3064c5d5 server: Allow client pipe creation with server pipe as root directory.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-26 23:25:38 +01:00
Paul Gofman aa5c1e871b server: Return STATUS_OBJECT_PATH_INVALID for noname pipe name query.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-26 23:25:38 +01:00
Paul Gofman a2ffa8ef7e server: Allow named pipes creation with device file as root directory.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-26 23:25:38 +01:00
Paul Gofman ae106feed2 server: Do not dereference symlinks specified as root directory.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-26 23:25:38 +01:00
Alexandre Julliard ce5e1c12c3 ntdll/tests: Fix a trace format on ARM64.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-26 23:25:38 +01:00
Rémi Bernon 97825b9c53 ntdll: Return failure from RtlQueryProcessDebugInformation.
Some DRM call it with GetCurrentThreadId(), although they don't seem to
mind about the result.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-26 21:31:53 +01:00
Rémi Bernon e0a1bdf2bc server: Return STATUS_INVALID_CID from NtOpenProcess.
When appropriate, instead of STATUS_INVALID_PARAMETER.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-26 21:31:53 +01:00
Rémi Bernon 3326c578f3 ntdll/tests: Add tests for NtOpenProcess return status.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-26 21:31:53 +01:00
Alexandre Julliard 043489456c ntdll: Make x86_64 syscall thunks position independent.
Based on a patch by Paul Gofman.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-25 21:39:19 +01:00
Erich E. Hoover 773b97bb2b ntdll: Fix converting large 32-bit time_t when time_t is signed.
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-24 22:09:30 +01:00
Rémi Bernon 255270373e ntdll: Raise debug exceptions when invalid heap is destroyed.
And when PEB->BeingDebugged is set to 1. Lords Of The Fallen anti-tamper
does this and only continues if a DBG_PRINTEXCEPTION_C is received.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-20 19:01:04 +01:00
Rémi Bernon c5129d6fc0 ntdll: Reimplement DbgPrint* using DBG_PRINTEXCEPTION_C.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-20 19:01:04 +01:00
Rémi Bernon 1425363bbd ntdll/tests: Add tests for DbgPrint* functions.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-20 19:01:04 +01:00
Rémi Bernon ad24187de8 ntdll: Stub ThreadEnableAlignmentFaultFixup info class.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46216
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-20 19:01:04 +01:00
Zebediah Figura ebd92b980a ntdll: Semi-stub SystemModuleInformationEx.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45666
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-27 09:51:32 +01:00
Zebediah Figura bf9235aa56 ntdll/tests: Add more tests for SystemModuleInformation[Ex].
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-27 09:51:27 +01:00
Myah Caron d453db5ba2 ntdll: Stub NtAllocateVirtualMemoryEx.
Signed-off-by: Myah Caron <qsniyg@protonmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-26 20:34:19 +01:00
Paul Gofman fa409a91b0 ntdll/tests: Test AVX context with debugger.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-13 22:30:05 +02:00
Paul Gofman 4e52f7ca86 ntdll/tests: Test getting and setting AVX registers for the other thread.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-13 22:30:05 +02:00
Alexandre Julliard 96dcee6430 server: Implement object name information for registry keys.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-22 21:35:35 +02:00
Alexandre Julliard bdb2fe0cad server: Return the device name for named pipe files.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-22 21:35:34 +02:00
Alexandre Julliard 7b79c8059d server: Return the device name for mailslot files.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-22 21:35:34 +02:00
Paul Gofman ba2924a64d ntdll/tests: Test named pipe with empty name.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-22 13:18:48 +02:00
Francois Gouget cdfec11e42 ntdll/tests: Fix the spelling of a couple of ok_() messages.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-21 19:24:19 +02:00
Hans Leidekker ec02224941 ntdll: Return buffer filled with random values from NtQuerySystemInformation(SystemInterruptInformation).
Based on a patch by Sebastian Lackner.

Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-09 20:30:31 +02:00
Paul Gofman 7ec069d85f ntdll/tests: Fix virtual test failures on win10pro.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-07 21:09:36 +02:00
Paul Gofman 0c857e92cb ntdll/tests: Fix exception test failures on win10pro.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-07 21:09:31 +02:00
Martin Storsjo 3395ee3631 ntdll: Fix more corner cases for arm64 packed info unwinding.
Make sure to restore sp from fp for CR == 3.

Fix unwinding of partial prologues/epilogues - the previous logic
had an off-by-one for the pos/skip handling; fix a few more
corner cases with odd number of saved registers.

Functions with the H flag set (saving x0-x7 on the stack) should
be considred having 4 nops (for the instructions saving the
registers) in the prologue for unwind purposes. When unwinding
through a partial epilogue, the same 4 nops should also be
considered to be there (even though no sane epilogue would restore
the registers there) based on how windows handles partial epilogue
unwinding in those cases.

Uncomment prologue/epilogue cases in an existing test and add
tests for many more cases.

Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-07 21:08:26 +02:00
Paul Gofman 61f3b3dcdf ntdll/tests: Add tests for capturing context with xstate.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-02 16:30:04 +02:00
Paul Gofman 81a08cea79 kernel32: Implement CopyContext().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-01 12:34:43 +02:00
Paul Gofman 85a33ff731 kernel32: Implement GetXStateFeaturesMask().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-01 12:33:47 +02:00
Paul Gofman 541b06747a kernel32: Implement SetXStateFeaturesMask().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-01 12:33:44 +02:00
Paul Gofman 3803997349 ntdll: Implement RtlLocateLegacyContext().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-31 21:41:06 +02:00
Paul Gofman ff88ed8b06 kernel32: Implement LocateXStateFeature().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-31 21:41:06 +02:00
Paul Gofman 2d544ff8a0 kernel32: Implement InitializeContext[2]().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-31 21:41:06 +02:00
Paul Gofman 2de4f12b33 ntdll: Implement RtlGetExtendedContextLength().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-31 21:41:06 +02:00
Alexandre Julliard 2b40969c58 kernel32: Move the initial process breakpoint to LdrInitializeThunk().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-31 11:36:24 +02:00
Martin Storsjo a12e308eba ntdll/tests: Add a larger testcase covering most arm64 unwinding opcodes.
These all seem to be implemented correctly as no changes to the
wine implementation is needed.

Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-25 13:34:31 +02:00
Martin Storsjo bc3284f818 ntdll: Implement the arm64 machine frame and context unwind opcodes.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-25 13:34:31 +02:00
Martin Storsjo 41d1fd3229 ntdll/tests: Support testing float registers in the arm64 virtual unwind test.
Only testing d0-d15, not d16-d31, for keeping the test references
a bit smaller.

Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-25 13:34:31 +02:00
Martin Storsjo 8c0c70dd0f ntdll/tests: Add defines for the complete set of arm64 unwidning opcodes.
Also correct the previous definition of UWOP_NOP which was a typo
(but it wasn't used in any testcase yet).

Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-25 13:21:07 +02:00
Martin Storsjo a729af0e9c ntdll: Set handler_data correctly in arm64 RtlVirtualUnwind.
This matches what tests show is done on actual windows, in the
current testcases; in all currently tested cases, handler_data is
reset to NULL when no handler is returned.

Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-25 13:21:01 +02:00
Zebediah Figura aaea13a128 server: Report named pipe device files as type "File".
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-24 22:14:44 +02:00
Arkadiusz Hiler 9012096b47 Revert "ntdll/tests: Add test to check if GetTickCount is updated after sleeping.".
This reverts commit 4617f83fcf.

The assumption that GetTickCount() gets updated after Sleep(1) holds only
when there is no other software running on the system. If any program uses
timeBeginPeriod() with values 1-15 then this assumption breaks.

A lot of common user software calls timeBeginPeriod() - this includes browsers,
media players, voice communicators, IDEs and store fronts.

Signed-off-by: Arkadiusz Hiler <ahiler@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-24 22:14:44 +02:00
Martin Storsjo 32c618b7c5 ntdll: Add initial tests for arm64 RtlVirtualUnwind.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-24 11:16:03 +02:00
Paul Gofman 601175822e ntdll: Restore AVX registers in NtSetContextThread() on i386.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-21 16:54:39 +02:00
Paul Gofman 9aa885bf37 ntdll: Support AVX context in fault exceptions on Linux i386.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-21 16:54:38 +02:00
Paul Gofman 2c3719c7a9 ntdll: Restore AVX registers in NtSetContextThread() on x86_64.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-21 16:54:38 +02:00
Paul Gofman 16ed88a952 ntdll: Support AVX context in fault exceptions on Linux x86_64.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-21 16:54:38 +02:00
Paul Gofman 3f562e0b91 ntdll/tests: Add test for xstate in extended context.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-21 15:36:49 +02:00
Paul Gofman a4af2b2b70 kernel32: Implement GetEnabledXStateFeatures().
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-20 21:14:15 +02:00
Paul Gofman 97b5ad7597 wineboot: Initialize XState features in user_shared_data.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-20 18:50:02 +02:00
Serge Gautherie 743ed29af5 winapi_test: Update generated.c files.
Signed-off-by: Serge Gautherie <winehq-git_serge_180711@gautherie.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-14 22:04:03 +02:00
Paul Gofman 71090bdc2f ntdll: Don't mind epilog in RtlVirtualUnwind() in case of zero op count on x64.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-14 22:02:04 +02:00
Paul Gofman ae07938ba6 ntdll: Support nested exceptions on x64.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-14 22:02:04 +02:00
Paul Gofman 76556bc588 ntdll: Support UWOP_PUSH_MACHFRAME opcode in RtlVirtualUnwind() on x64.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-13 12:27:03 +02:00
Paul Gofman d4052e0d70 ntdll/tests: Always remove hook trampoline in test_kiuserexceptiondispatcher().
As it is not removed by the hook itself if the hook is not called in the last
test.

Fixes test failures on Win 2003.

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-13 12:26:34 +02:00
Rémi Bernon 26c078a2a6 ntdll/tests: Run RtlRaiseException tests on x86_64.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-12 11:04:40 +02:00
Rémi Bernon 94ee270972 ntdll/tests: Add broken FltSave results for w2008 / w8.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-12 11:00:46 +02:00
Rémi Bernon f804d1ac70 ntdll/tests: Fix w2008 debugger test results.
Changing Eip has an effect there, so offset it just a little bit so that
it still falls within code.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-12 11:00:42 +02:00
Alexandre Julliard 13abe9e2bd ntdll/tests: Run exception tests under the debugger on all platforms.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-11 17:56:10 +02:00
Serge Gautherie 99c0ab2ea1 winapi_test: Restore horizontal alignment of macro defines.
Signed-off-by: Serge Gautherie <winehq-git_serge_180711@gautherie.fr>
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-10 21:26:15 +02:00
Serge Gautherie c26d7470cc winapi_test: Horizontally align TEST_TYPE_SIGNED() parameter.
Signed-off-by: Serge Gautherie <reactos-git_serge_171003@gautherie.fr>
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-10 21:25:56 +02:00
Daniel Lehman 93fa2e0ab8 ntdll/tests: Handle 32 cores.
Signed-off-by: Daniel Lehman <dlehman25@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-06 11:38:48 +02:00
Zebediah Figura 31800a1414 server: Use a separate object for each opened mailslot device file.
This is essentially a straight port of 2600ecd4ed.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-03 10:20:03 +02:00
Zebediah Figura f4e5556547 ntdll/tests: Add more tests for object names.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-01 10:02:16 +02:00
Alexandre Julliard eee92591bc ntdll/tests: Add thread context test for ARM platforms.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-28 14:16:53 +02:00
Alexandre Julliard 06c09fca31 ntdll/tests: Add tests for RtlCaptureContext() and NtGetContextThread() on x86_64.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-28 14:13:48 +02:00