Commit Graph

5743 Commits

Author SHA1 Message Date
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