Alexandre Julliard
78cbc26957
ntdll: Fill the Wow64 PEB and process parameters.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-25 21:13:00 +02:00
Alexandre Julliard
72ace07c6f
ntdll: Pass an extra context arguments to APC functions on 64-bit.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-25 21:13:00 +02:00
Alexandre Julliard
8e01e8763b
ntdll: Implement NtTestAlert().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-25 21:13:00 +02:00
Alexandre Julliard
1364b11fd4
ntdll: Pass the result status to call_user_apc_dispatcher().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-25 21:13:00 +02:00
Alexandre Julliard
e1716530d9
server: Use a standard user APC also for timers.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-25 21:13:00 +02:00
Alexandre Julliard
118bd9fee3
ntdll: Always put the pthread stack at the top of the 64-bit stack if there's one.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-25 21:13:00 +02:00
Zebediah Figura
834e2f04c6
ntdll: Implement IOCTL_AFD_POLL.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50975
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-25 09:35:23 +02:00
Alexandre Julliard
1e5eee0fc3
ntdll: Fetch the debug channels from the PEB memory block on the PE side.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-24 22:03:44 +02:00
Alexandre Julliard
d389da0953
ntdll: Store debug options in the PEB memory block.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-24 21:37:49 +02:00
Alexandre Julliard
4e8fcc41ca
ntdll: Replace __wine_make_process_system by a Wine-specific NtSetInformationProcess() class.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-24 18:31:27 +02:00
Daniel Lehman
1bfa845a67
ntdll: Silence clang warning.
...
Signed-off-by: Daniel Lehman <dlehman25@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-24 11:42:37 +02:00
Daniel Lehman
cb6a6bb6cf
ntdll/tests: Clean up temp file.
...
Signed-off-by: Daniel Lehman <dlehman25@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-24 11:42:37 +02:00
Zebediah Figura
b8f4061df0
ntdll: Implement IOCTL_AFD_RECV.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50366
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-24 11:34:32 +02:00
Zebediah Figura
5d3fde087a
ntdll: Move struct async_fileio to unix_private.h.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-24 11:32:59 +02:00
Zebediah Figura
97afac469f
ntdll: Avoid accessing the I/O status block in wait_async().
...
Steam uses WSASend() with completion ports, reusing OVERLAPPED structures as
soon as they are returned from GetQueuedCompletionStatus(). Since completion is
queued during the select request in wait_async(), the I/O status block can be
reused even before the call to NtDeviceIoControl exits.
This works fine with current Wine, because WSASend() doesn't access the I/O
status block after queuing completion. However, a patch that changes it to use
wait_async() like other async requests causes NtDeviceIoControlFile to
consistently return garbage status codes.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-24 11:32:28 +02:00
Alexandre Julliard
771e9260f8
ntdll/tests: Only load RtlWow64GetCpuAreaInfo() on 64-bit.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-21 18:08:45 +02:00
Paul Gofman
ddd161f339
ntdll: Validate job handles at process creation.
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-20 21:48:57 +02:00
Alexandre Julliard
e8a1341f5c
ntdll: Add platform-specific helpers for getting/setting the Wow64 context.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-18 17:53:30 +02:00
Alexandre Julliard
ee0b909f87
ntdll: Export RtlWow64Get/SetThreadContext() on all 64-bit platforms.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-18 17:53:30 +02:00
Alexandre Julliard
8eda3fcc68
ntdll: Pass a server context to server_select().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-18 17:53:30 +02:00
Alexandre Julliard
f04c2bd4f1
ntdll: Make the server context conversion functions generic.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-18 17:46:41 +02:00
Zebediah Figura
f47a09b917
ntdll/tests: Fix a copy-paste error in an ok message.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-18 09:56:43 +02:00
Alexandre Julliard
5ba8f0d73b
ntdll: Store the Wow64 context at the top of the 64-bit stack.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-17 18:49:09 +02:00
Alexandre Julliard
e40eab977a
ntdll: Only check the is_wow64 flag on 32-bit platforms.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-17 18:49:09 +02:00
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
711bde7cd1
ntdll: Add a helper function to set the thread id.
...
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
d743c1e6c3
server: Send TEB and PEB in the process_init_done request.
...
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
Zebediah Figura
07ea3061e2
ntdll: Use %I64x instead of %lx to trace 64-bit values.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-13 10:41:03 +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
6f9562db20
ntdll: Only compute the zero_bits mask when needed.
...
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
Alexandre Julliard
6de7fa1bde
ntdll: Take the zero_bits parameter into account in NtCreateThreadEx().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-07 22:22:49 +02:00
Alexandre Julliard
6a296592aa
server: Send the zero_bits parameter for remote NtCreateThreadEx() calls.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-07 22:22:49 +02:00
Alexandre Julliard
e9bc48e90a
ntdll: Force executing IL-only binaries on the native machine.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51101
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
a7b5786f70
ntdll: Fix the check for the main exe in get_load_order().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-06 18:12:37 +02:00
Jacek Caban
fdf568aaae
ntdll: Inherit tty std input and output in processes attached to Unix console.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50117
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-05 21:52:23 +02:00
Alexandre Julliard
d47a711e98
ntdll: Open the per-application key for load order at startup.
...
It avoids accessing process parameters after startup.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-05 21:52:22 +02:00
Alexandre Julliard
75b1db42e5
ntdll: Return the full path to start.exe in load_start_exe().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-05 21:52:22 +02:00
Alexandre Julliard
87b7132b37
ntdll: Implement RtlFindExportedRoutineByName().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-05 21:52:22 +02:00
Alexandre Julliard
b35404aa61
include: Disallow wcsncpy() in Wine, similarly to strncpy().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-04 21:33:15 +02:00
Alexandre Julliard
e85dee1fb7
ntdll: Don't output thread traces to the seh channel.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-04 14:28:13 +02:00
Zebediah Figura
beef84721d
ntdll: Quiet the FIXME for unmapped NTSTATUS values.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-04 09:37:33 +02:00
Louis Lenders
1a02b3f1c6
ntdll: Stub RtlQueryProcessPlaceholderCompatibilityMode().
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50026
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-03 20:42:29 +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
Sven Baars
2d218c924d
ntdll: Fix some memory leaks (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
d6a7b35669
ntdll: Sort the info classes by numeric value in NtQuerySystemInformation().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-03 20:42:29 +02:00
Alexandre Julliard
8b79c8d41f
ntdll: Use the native machine id instead of hardcoded values.
...
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
a5aaa41069
makefiles: Install libwine into the architecture-specific directory.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-28 11:41:27 +02:00
Alexandre Julliard
2801d6341c
makefiles: Install Unix binaries into an architecture-specific directory.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-28 11:40:39 +02:00
Alexandre Julliard
620c0818bf
ntdll: Check all supported architectures in is_builtin_path().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-28 10:25:02 +02:00
Alexandre Julliard
616415a6df
ntdll: Store the debug info for the initial thread next to the PEB.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-27 16:52:30 +02:00
Alexandre Julliard
789c1db18a
ntdll: Allocate TEBs and stacks in the low 2G.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-27 16:52:30 +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
Alexandre Julliard
cda02cdddb
ntdll: Always allocate space for both 32- and 64-bit PEB.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-27 16:52:30 +02:00
Alexandre Julliard
79a148e1fa
ntdll: Add separate helpers for loading pe and so builtins.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-27 16:52:30 +02:00
Alexandre Julliard
339ed57643
server: Get rid of the CPU type and functions.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-27 10:42:04 +02:00
Alexandre Julliard
308bd35746
server: Store a machine ID instead of a CPU in the context structure.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-27 10:40:53 +02:00
Henri Verbeet
b9070e1153
ntdll: Clear ret->Buffer on failure in get_env_var() (Valgrind).
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-26 21:34:02 +02:00
Alexandre Julliard
893febda14
makefiles: Install PE fake dlls in the architecture-specific directory.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-26 21:34:02 +02:00
Alexandre Julliard
f93713b157
ntdll: Support loading builtins from the architecture-specific PE directory.
...
Based on a patch by Jacek Caban.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-26 21:34:02 +02:00
Alexandre Julliard
df1c03a007
ntdll: Fix drive letter of current directory in get_full_path().
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51057
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-25 16:38:08 +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
2e0a96a483
ntdll: Make sure that the virtual heap doesn't overlap the preloader range.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50963
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-23 20:02:06 +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
Alexandre Julliard
a51f26badf
server: Return the process machine from the main exe instead of a CPU flag.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-23 20:02:06 +02:00
Alexandre Julliard
96865eb7e7
server: Return a list of supported machines instead of a CPU bitmask.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-23 15:17:54 +02:00
Alexandre Julliard
191fd47e38
server: Get rid of the remaining PowerPC support.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-23 12:41:45 +02:00
Alexandre Julliard
a639db3e8c
configure: Stop building libwine on Android.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-22 15:50:39 +02:00
Alexandre Julliard
9f2751ca3f
ntdll: Remove no longer used defines from the makefile.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-22 15:32:44 +02:00
Rémi Bernon
b3f6f21d01
ntdll: Make sure unix_name is zero terminated (valgrind).
...
In nt_to_unix_file_name_no_root.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-22 10:30:52 +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
Alexandre Julliard
aaa501fe93
ntdll: Fix buffer allocation size in get_env_var().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-21 17:08:06 +02:00
Rémi Bernon
96f5968a65
ntdll: Clear the first ~1MB of stack in signal_start_thread.
...
Instead of the whole stack.
Stack creation in virtual_alloc_thread_stack and RtlCreateUserStack, as
well as Windows rounding logic, enforce a minimum reserved size of 1MB.
There's a few guard and canary pages used on the bottom, plus a few more
on the top for initial context, and we have to keep a bit of space if we
ever need a stack while doing this, so we clear a bit less than 1MB to
be safe.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-21 09:42:45 +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
Alexandre Julliard
1cf2ae1907
ntdll: Support a full path name in the loadFrom dll redirection entry.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50978
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-21 08:55:38 +02:00
Paul Gofman
6e75cc98e8
ntdll: Release IO thread pool object from ioqueue_thread_proc().
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-20 21:07:09 +02:00
Alexandre Julliard
870340ee60
ntdll: Load libwine before the main image.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51018
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-19 20:08:48 +02:00
Alexandre Julliard
e436a40e80
ntdll: Don't bother setting the preloader range for fake dlls.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-19 18:28:52 +02:00
Alexandre Julliard
55d98c572c
ntdll: Use the loadFrom directory to load dlls from the activation context.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50978
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-19 15:39:55 +02:00
Alexandre Julliard
8f3383f741
ntdll: Parse the loadFrom attribute in manifest dll elements.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-19 15:39:55 +02:00
Alexandre Julliard
2d519f5aa4
ntdll: Support MaxVersionTested in the manifest compatibility element.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-19 15:39:55 +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
828077e3b3
server: Pass the NT process flags to the new_process request.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-16 12:07:51 +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
4e6da5942e
ntdll: Get rid of the rebuild_nt_name() helper.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-15 17:30:50 +02:00
Alexandre Julliard
7ef35b3393
ntdll: Reimplement file system redirection using NT pathname comparisons.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-15 17:30:50 +02:00
Alexandre Julliard
8e7c6422e5
ntdll: Move create_startup_info() to env.c.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-15 17:30:50 +02:00
David Torok
11ae0ade89
ntdll: Add NtCreateThread stub.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50952
Signed-off-by: David Torok <dt@zeroitlab.com>
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-15 10:34:35 +02:00
Alexandre Julliard
35cd411547
ntdll: Always pass object attributes to nt_to_unix_file_name().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-14 17:04:35 +02:00
Alexandre Julliard
90024e492d
ntdll: Move nt_to_unix_file_name_attr() to avoid forward declarations.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-14 17:04:35 +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
Paul Gofman
3386560057
ntdll: Remove wait timeout in get_thread_context().
...
Fixes hangs during loading or after campaign start in
Mount & Blade II: Bannerlord.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-13 17:39:13 +02:00
Zhiyi Zhang
14b4492086
ntdll: Initialize nt_name before using it.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50979
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-13 13:05:31 +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
Alexandre Julliard
302d44004e
ntdll: Reuse the Unix name buffer for get_dos_device().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-13 13:05:29 +02:00
Alexandre Julliard
8ffb9b31d0
ntdll: Initialize version and session id on the Unix side.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-13 13:05:29 +02:00
Alexandre Julliard
cdb1f3ae55
ntdll: Cleanup the path with collapse_path() in unix_to_nt_file_name().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-12 19:32:15 +02:00
Alexandre Julliard
f1e614027b
ntdll: Take loadorder into account also for a main exe in .so format.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50956
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-12 09:20:55 +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
Alistair Leslie-Hughes
3269da9b46
ntdll: Stub NtQuerySystemInformation(SystemCodeIntegrityInformation).
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49192
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-08 21:37:36 +02:00
Alexandre Julliard
16d70584db
ntdll: Don't close handles in APC requests sent to self.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50904
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-08 18:16:52 +02:00
Alexandre Julliard
277a5728da
ntdll: Don't try to open the file in the prefix for 16-bit builtins.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-08 18:16:52 +02:00
Alexandre Julliard
446f7e3aa8
ntdll: Add a WINEBOOTSTRAPMODE environment variable to allow loading non-existent builtins.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50905
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-08 18:16:00 +02:00
Alexandre Julliard
7512c53b89
ntdll: Cache the main image section information.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50937
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-07 10:51:32 +02:00
Alexandre Julliard
89db25afda
ntdll: Check for DLL files when creating new processes.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50912
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-06 22:46:12 +02:00
Alexandre Julliard
6d5a6c3466
ntdll: Avoid closing a handle twice.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-06 22:46:12 +02:00
Alexandre Julliard
7c0d6e8067
ntdll: Also fallback to native if builtin is for the wrong architecture.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-06 22:46:09 +02:00
Alexandre Julliard
2330a5860a
ntdll: Stop exporting wine_server_send_fd() and wine_server_release_fd().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-05 15:07:01 +02:00
Alexandre Julliard
985bd97c2b
ntdll: Retrieve Wine version strings through NtQuerySystemInformation().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-05 15:07:01 +02:00
Alexandre Julliard
beff5c56cd
ntdll: Move the PEB initialization to LdrInitializeThunk().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-05 12:08:09 +02:00
Alexandre Julliard
04762b3576
ntdll: Move the global options initialization to LdrInitializeThunk().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-05 12:08:09 +02:00
Alexandre Julliard
4f594e1552
ntdll: Move Wow64 initialization to LdrInitializeThunk().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-05 12:08:09 +02:00
Alexandre Julliard
7a1ed2e121
ntdll: Remove path from application name to open loadorder key.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50914
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-03 13:00:46 +02:00
Alexandre Julliard
7929b21ede
ntdll: Define NtCurrentTeb64() on 64-bit to avoid some #ifdefs.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-01 12:25:21 +02:00
Alexandre Julliard
e6ed943028
ntdll: Move creation of the initial modules to LdrInitializeThunk().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-01 12:01:43 +02:00
Alexandre Julliard
c00c62bbfd
ntdll: Create the initial stack on the Unix side.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-01 11:25:48 +02:00
Paul Gofman
51f7c9d15e
ntdll: Close server socket before calling exit().
...
So if a native exit handler hangs the process eventually gets killed by server.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-31 22:16:25 +02:00
Alexandre Julliard
2a8a4cbbe6
ntdll: Move kernel32 loading into LdrInitializeThunk().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-31 21:13:45 +02:00
Alexandre Julliard
0bbbf016b1
ntdll: Return system dir path for PE mapping bootstrap placeholders.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-31 21:13:45 +02:00
Alexandre Julliard
42de71c387
ntdll: Fail to load non-existent dlls, except during prefix bootstrap.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-31 21:01:31 +02:00
Alexandre Julliard
8bcb44a99b
ntdll: Also check syswow64 to determine if the prefix was initialized.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-31 19:26:09 +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
Alexandre Julliard
c5b0dd5fc2
ntdll: Set the window title to the image name on the Unix side.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-30 12:26:37 +02:00
Alexandre Julliard
f55f0b8448
ntdll: Remove load_builtin_dll() and get_load_order() from the Unix interface.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-30 11:51:28 +02:00
Alexandre Julliard
bb065801a6
ntdll: Map the builtin or fake dll from the Wine dirs if it's missing from the prefix.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-30 11:51:25 +02:00
Alexandre Julliard
4a10f3a188
ntdll: Allow using the .fake files from the build tree as PE mapping placeholders.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-30 10:06:44 +02:00
Alexandre Julliard
a3d9c487de
ntdll: Load builtin exe without a corresponding file only before the prefix is fully initialized.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-30 09:59:38 +02:00
Alexandre Julliard
726cf9c0eb
ntdll: Make sure the argv array matches the Unicode version, even when launching start.exe.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-30 09:56:32 +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
Alexandre Julliard
b12bf4d8d8
ntdll: Unmap main image even if not loaded at base address.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50874
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-29 12:19:59 +02:00
Alexandre Julliard
f17483b936
ntdll: Check the loadorder for .so dlls on the Unix side.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-26 16:16:12 +01:00
Alexandre Julliard
e8ec7a8cec
ntdll: Don't pass the application name to get_load_order().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-26 16:16:12 +01:00
Alexandre Julliard
4e2bd548b1
ntdll: Make the is_win64 variable global.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-26 14:48:34 +01:00
Alexandre Julliard
482a26e135
ntdll: Use the same builtin check for process creation and initial image loading.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-26 11:38:43 +01: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
Alexandre Julliard
9bdfb1f34a
ntdll: Set the initial DllPath to null if it's empty.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-25 12:07:04 +01:00
Alexandre Julliard
50e33a213d
ntdll: Use start /exec to support absolute Unix paths.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50858
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-25 11:46:01 +01:00
Alexandre Julliard
aef821ccbd
ntdll: Add a helper to launch start.exe always as builtin.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-25 11:46:01 +01:00
Alexandre Julliard
967100258f
ntdll: Check the main image for Unix path only the first time around.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50858
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-25 11:46:01 +01:00
Alexandre Julliard
47fed8f5bc
ntdll: Don't set the DllPath parameter by default.
...
Recent Windows versions don't set it either.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-24 20:43:49 +01:00
Alexandre Julliard
34884bf5d0
ntdll: Remove the no longer needed exec_process() function.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-24 20:43:49 +01:00
Alexandre Julliard
28fe84da45
ntdll: Load the main image from the Unix side.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-24 20:43:49 +01:00
Alexandre Julliard
662730a1bf
ntdll: Set the Wow64 environment variables from the Unix side.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-24 20:43:48 +01:00
Mark Harmstone
3fd9a423d4
ntdll: Take into account ordinal base when resolving forwarded ordinals.
...
Signed-off-by: Mark Harmstone <mark@harmstone.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-24 20:43:48 +01:00
Alexandre Julliard
ec5925a8a2
ntdll: Set the additional environment variables from the Unix side.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-23 20:50:50 +01:00
Alexandre Julliard
5246f34a3e
ntdll: Return an NT path for the initial current directory.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-23 17:42:20 +01:00
Zebediah Figura
d144890c88
ntdll: Hold fd_cache_section while removing and closing handles.
...
Otherwise, it's possible for the old handle to be re-added to the cache between
removing and closing it.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-23 12:29:10 +01:00
Zebediah Figura
64cfcc1c62
ntdll: Remove the source fd from the cache before calling the dup_handle request.
...
If another thread creates and accesses a file between the dup_handle request and
the call to remove_fd_from_cache(), the file may be allocated to the same handle
number, and that thread will then receive the wrong unix fd. Avoid this race by
invalidating the cache first.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-23 12:29:10 +01:00
Zebediah Figura
5df0f5f6fb
ntdll: Use a kernel APC to call NtDuplicateObject() if DUPLICATE_CLOSE_SOURCE is used on another process.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-23 12:29:10 +01:00
Alexandre Julliard
ab8f0c3e21
ntdll: Load builtin dlls through NtMapViewOfSection().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-22 20:38:45 +01:00
Alexandre Julliard
49f12d65d8
ntdll: Don't return an existing address when mapping a builtin PE dll.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-22 20:38:45 +01:00
Alexandre Julliard
cb14be78ff
ntdll: Move the builtin image checks to virtual_map_builtin_module().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-22 20:38:45 +01:00
Alexandre Julliard
24a5a10142
ntdll: Replace image mapping by the builtin module directly in NtMapViewOfSection().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-22 20:38:45 +01:00
Alexandre Julliard
5dcd3c1dd9
ntdll: Return the mapping size in virtual_map_builtin_module().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-22 20:38:45 +01:00
Alexandre Julliard
0ea5772113
ntdll: Use NtAreMappedFilesTheSame() to find duplicated module mappings.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-22 20:38:25 +01:00
Alexandre Julliard
20c4ae45ce
ntdll: Add refcounting for .so builtin dlls.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-22 18:52:58 +01:00
Alexandre Julliard
89340bb762
ntdll: Load the Unix library only when __wine_init_unix_lib() is called.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-22 18:52:58 +01:00
Alexandre Julliard
cc9446f874
server: Don't change the reported machine for COM+ images.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50826
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-19 22:09:23 +01:00
Alexandre Julliard
74390cead3
ntdll: Add a global constant for the system directory.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-19 19:55:34 +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
Alexandre Julliard
86947587d2
server: Remove the redundant cpu field in the PE image information.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-17 11:49:23 +01:00
Alexandre Julliard
4ea07a30ce
ntdll: Check the builtin signature when creating a module.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-17 11:49:23 +01:00
Rémi Bernon
4d5824112e
ntdll: Don't call possibly deadly DbgUiGetThreadDebugObject.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-16 22:16:54 +01:00
Alexandre Julliard
5cc6035284
ntdll: Add the builtin signature in .so file mappings.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-16 20:36:43 +01:00
Alexandre Julliard
e0fc8d7acb
ntdll: Call the Unix entry point from the Unix side.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-16 20:36:43 +01:00
Alexandre Julliard
22da5bd757
ntdll: Move the loadorder support to the Unix library.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-16 20:36:43 +01:00
Alexandre Julliard
9e38a68001
ntdll: Add a helper for mapping a PE image.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-16 11:01:19 +01:00
Alexandre Julliard
8824474e08
ntdll: Move the builtin dll list to virtual.c.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-16 10:58:14 +01:00
Hans Leidekker
e6407c39ba
ntdll: Fall back to reading /dev/urandom if getrandom() is not supported.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50168
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-16 10:45:59 +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
Alexandre Julliard
6531f262e3
server: Return the file name for image mappings in the get_mapping_info request.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-15 11:02:20 +01:00
Alexandre Julliard
9107f591d3
ntdll: Explicitly reset the PATH variable before reloading the environment.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50786
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-09 21:33:43 +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
Rémi Bernon
0eb3258a69
ntdll: Initialize mountmgr_unix_drive before NtDeviceIoControlFile (valgrind).
...
Syscall param writev(vector[...]) points to uninitialised byte(s)
at 0x4189DA3: writev (writev.c:26)
by 0x46A5A1B: send_request (server.c:213)
by 0x46A5A1B: server_call_unlocked (server.c:273)
by 0x46CA54F: virtual_locked_server_call (virtual.c:2993)
by 0x4681C9A: server_ioctl_file (file.c:4789)
by 0x468B326: NtDeviceIoControlFile (file.c:5620)
by 0x468B7AF: get_mountmgr_fs_info (file.c:1986)
by 0x468B7AF: get_mountmgr_fs_info (file.c:1955)
by 0x468FCBB: NtQueryVolumeInformationFile (file.c:6483)
by 0x4677E88: __wine_syscall_dispatcher_xsave (in /home/rbernon/Code/build-wine/wine64/dlls/ntdll/ntdll.so)
by 0x7BC0DEB3: NtQueryVolumeInformationFile (in /home/rbernon/Code/build-wine/wine64/dlls/ntdll/ntdll.dll)
by 0x7B01F127: GetFileInformationByHandle (file.c:2938)
by 0x7096A5C3: _fstat64 (file.c:1791)
by 0x7096A941: _fstat64i32 (file.c:1877)
Address 0x7ffffe30e520 is in a rw- anonymous segment
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-09 21:33:43 +01:00
Rémi Bernon
f69e5478d5
ntdll: Fix environment memcpy read overflow (valgrind).
...
Invalid read of size 1
at 0x7BC5C5E3: memcpy (string.c:109)
by 0x7BC267F7: RtlCreateProcessParametersEx (env.c:785)
by 0x7B04EB57: create_process_params (process.c:183)
by 0x7B04EB57: CreateProcessInternalW (process.c:544)
by 0x7B0508E3: CreateProcessW (process.c:668)
by 0x403B1E: runCmd (wineboot.c:1055)
by 0x403B1E: process_run_key (wineboot.c:1126)
by 0x404228: ProcessRunKeys (wineboot.c:1159)
by 0x406DB1: main (wineboot.c:1707)
Address 0x7ffffe00331a is 0 bytes after a recently re-allocated block of size 12,074 alloc'd
at 0x7BC2D209: notify_alloc (heap.c:260)
by 0x7BC2D209: RtlAllocateHeap (heap.c:1713)
by 0x7BC25BAC: RtlSetEnvironmentVariable (env.c:515)
by 0x7BC25EE0: set_env_var (env.c:61)
by 0x7BC26C37: set_wow64_environment (env.c:228)
by 0x7BC26C37: init_user_process_params (env.c:891)
by 0x7BC3B01B: process_init (loader.c:3991)
by 0x7BC3CD24: __wine_set_unix_funcs (loader.c:4095)
by 0x469604E: start_main_thread (loader.c:1752)
by 0x469604E: __wine_main (loader.c:2083)
by 0x7D001231: main (main.c:157)
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-09 21:33:43 +01:00
Rémi Bernon
c3c4d0c37e
ntdll: Initialize dbg_offset and dbg_size (valgrind).
...
Syscall param writev(vector[...]) points to uninitialised byte(s)
at 0x4189DA3: writev (writev.c:26)
by 0x46A5A0B: send_request (server.c:213)
by 0x46A5A0B: server_call_unlocked (server.c:273)
by 0x46A5B4F: wine_server_call (server.c:289)
by 0x46C996A: virtual_create_builtin_view (virtual.c:2524)
by 0x4692CB4: dlopen_dll (loader.c:1133)
by 0x46931CA: open_builtin_file (loader.c:1373)
by 0x46931CA: open_builtin_file (loader.c:1354)
by 0x4694559: load_builtin_dll (loader.c:1457)
by 0x7BC375F2: load_builtin_dll (loader.c:2348)
by 0x7BC38369: load_dll (loader.c:2705)
by 0x7BC39E46: import_dll (loader.c:782)
by 0x7BC36CEC: fixup_imports (loader.c:1138)
by 0x7BC3BE4B: LdrInitializeThunk (loader.c:3454)
Address 0x32e390 is on thread 1's stack
in frame #5 , created by open_builtin_file (loader.c:1357)
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-09 21:33:43 +01:00
Roman Pišl
dabba3cc86
ntdll: Don't set error status if volume serial number is missing.
...
Fixes regression from b14eee69c7
.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50781
Signed-off-by: Roman Pišl <rpisl@seznam.cz>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-09 21:33:43 +01:00
Zebediah Figura
ba5465c71f
ntdll: Export RtlQueryRegistryValuesEx().
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46969
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-09 12:00:35 +01:00
Alexandre Julliard
0599347e96
ntdll: Launch wineboot from the Unix side.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-04 21:43:26 +01:00
Alexandre Julliard
d0a1bddea0
ntdll: Make sure we send valid object attributes in NtCreateUserProcess().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-04 21:43:26 +01:00
Alexandre Julliard
9443a7397d
ntdll: Predefine the SystemRoot and SystemDrive variables.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-04 21:43:26 +01:00
Alexandre Julliard
f6e64c55f2
ntdll: Set environment variables from the registry on the Unix side.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-04 21:41:44 +01:00
Alexandre Julliard
e63b8ead43
ntdll: Add support for growing the initial environment dynamically.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-04 21:32:26 +01:00
Alexandre Julliard
16b0994412
ntdll: Make the open_hkcu_key() helper available globally.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-04 10:42:35 +01:00
Alexandre Julliard
285830f5ec
ntdll: Add a helper to initialize a UNICODE_STRING on the Unix side.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-04 10:42:34 +01:00
Jacek Caban
e979ee96b6
ntdll: Use xsave compaction in syscall dispatcher.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-03 21:54:45 +01:00
Jacek Caban
c715243122
ntdll: Fix a typo in SegSs handling in NtSetContextThread.
...
Spotted by Brendan Shanks.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-03 21:54:45 +01:00
Paul Gofman
633db76f78
ntdll: Reset YMM state in NtSetContextThread() if that is assumed by the context being set.
...
Fixes test failure on testbot where compaction is not supported
(resetting YMM state if that is implied by the context being set).
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-03 21:54:44 +01:00
Paul Gofman
66a819ef0c
ntdll: Print an ERR for assertion exceptions only.
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-03 21:54:44 +01:00
Alexandre Julliard
46fd718ec7
ntdll: Fetch locale information from the Unix side in resource loading.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50769
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-03 21:54:44 +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
Jacek Caban
e990bd4676
ntdll: Use syscall frame for handling x86 YMM context in NtSetContextThread.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-02 20:41:08 +01:00
Jacek Caban
8064d9786a
ntdll: Use syscall frame for x86 YMM context in NtGetContextThread.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-02 20:41:03 +01:00
Jacek Caban
5d228d6fc9
ntdll: Store x86 YMM context insyscall dispatcher.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-02 20:40:49 +01:00
Alexandre Julliard
193d9fcf26
ntdll: Only check the existence of the directory for the Unix pathname heuristic.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-02 17:55:34 +01:00
Alexandre Julliard
e5cade0ff1
ntdll: Remove DLL_WINE_PREATTACH support.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-02 11:01:25 +01:00
Jacek Caban
6e03330a21
ntdll: Use syscall frame for FPU and XMM contexts in NtSetContextThread.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-01 21:13:00 +01:00
Jacek Caban
e5d671bee5
ntdll: Use syscall frame for FPU and XMM contexts in NtGetContextThread.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-01 21:13:00 +01:00
Jacek Caban
ce5f17c892
ntdll: Store FPU and XMM contexts in x86 syscall frame.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-01 21:13:00 +01:00
Jacek Caban
bbae70bf1e
ntdll: Use syscall frame in x86 call_raise_user_exception_dispatcher implementation.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-01 21:13:00 +01:00
Zebediah Figura
0421ea3975
ntdll: Stub Wow64Transition.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45567
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-01 18:03:18 +01:00
Alexandre Julliard
ff6a3433c5
ntdll: Store the locales in Wine-specific environment variables.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-28 11:30:37 +01:00
Alexandre Julliard
65cff86951
ntdll: Remove no longer needed Unix codepage functions from the PE side.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-28 11:29:46 +01:00
Alexandre Julliard
45bfa4eec3
ntdll: Check for existing Unix path name in RtlGetFullPathName_U().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-28 11:29:17 +01:00
Alexandre Julliard
0d173e5710
ntdll: Store the Unix codepage in a Wine-specific environment variable.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-28 11:24:54 +01:00
Alexandre Julliard
5828d7c136
ntdll: Adjust environment size for dynamic strings.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50732
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-27 17:42:50 +01:00
Alexandre Julliard
1e2b060eb1
ntdll: Pass correct pointer to build_module().
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50731
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-27 17:42:50 +01:00
Jacek Caban
c88b2ed3c0
ntdll: Use cpu_info to check for AVX availability.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-26 18:26:23 +01:00
Alexandre Julliard
a46515d449
ntdll: Get rid of attach_implicitly_loaded_dlls().
...
This should no longer happen.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-26 16:24:25 +01:00
Alexandre Julliard
9e01af751e
ntdll: Don't set runtime info at all if it's empty.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-26 16:24:21 +01:00
Jacek Caban
35e43ccf1b
ntdll: Use syscall frame in x86 set_full_cpu_context implementation.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-25 22:46:14 +01:00
Jacek Caban
b04f2689a2
ntdll: Store all non-volatile i386 registers in syscall dispatcher.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-25 22:44:18 +01:00
Jacek Caban
c6d303ca23
ntdll: Reserve space for full i386 context in syscall frame.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-25 22:43:19 +01:00
Alexandre Julliard
4dad4315d5
ntdll: Fix rounding the length of the runtime info parameter.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50723
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-25 22:39:21 +01:00
Alexandre Julliard
305cb8af27
ntdll: Initialize the ShowDotFiles option on the Unix side.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-25 16:15:26 +01:00
Alexandre Julliard
06b729f777
ntdll: Relocate the PE ntdll if necessary.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-25 16:15:26 +01:00
Alexandre Julliard
93eb4dbde8
ntdll: Add a separate helper for creating the initial ntdll module.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-25 16:15:26 +01:00
Jacek Caban
aae2e2adf0
ntdll: Fix compacted legacy xsave area handling.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-24 22:01:42 +01:00
Jacek Caban
7b95cdffa6
ntdll: Use the right cpuid for XSAVEC detection.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50713
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-24 22:01:42 +01:00
Jacek Caban
014f249aea
ntdll: Don't use FeatureSet for XSAVE compaction support flag.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-24 22:01:42 +01:00
Jacek Caban
43900dd621
ntdll: Use syscall frame in x86_64 call_raise_user_exception_dispatcher implementation.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-24 22:01:42 +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
Jacek Caban
a8856381ed
ntdll: Use xsavec in x86_64 syscall dispatcher.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-22 20:19:17 +01:00
Jacek Caban
437bef6ac1
ntdll: Use syscall dispatcher for restoring context in x86_64 NtSetContextThread implementation.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-22 20:19:15 +01:00
Jacek Caban
bdf4b3b400
ntdll: Use NtContinue in RtlRestoreContext.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-22 20:19:12 +01:00
Jacek Caban
b3dfc903ef
ntdll: Use NtContinue in NtRaiseException.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-22 20:19:10 +01:00
Jacek Caban
3ecd43dc6f
ntdll: Use syscall frames in x86_64 NtSetContextThread implementation.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-22 20:19:07 +01:00
Jacek Caban
4de079bb72
ntdll: Use syscall frame for x86_64 YMM context in NtGetContextThread.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-19 23:46:30 +01:00
Jacek Caban
11e3d43c26
ntdll: Store x86_64 YMM context in syscall frame.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-19 23:46:30 +01:00
Jacek Caban
a0a62463e3
ntdll: Introduce signal_init_syscalls.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-19 23:46:30 +01:00
Alexandre Julliard
d89b304eb7
ntdll: Avoid sign conversion warnings in Thumb-2 relocation processing.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-19 23:46:25 +01:00