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
Paul Gofman
03cebb22d8
ntdll: Fix SMT CPU flag reporting.
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-20 19:01:04 +01:00
Paul Gofman
2002aa15f4
ntdll: Avoid overwriting parameters with context in call_user_apc_dispatcher() on x86.
...
Fixes crash in 32 bit kernel32 file test. The crash is not always reproducible
as the issue depends on stack layout.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-17 21:16:43 +01:00
David Torok
74f95d9ff2
ntdll: Add NtDebugActiveProcess stub.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47198
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-16 21:06:18 +01:00
Damjan Jovanovic
2f90b17ab2
ntdll: Document a few other filesystem case-sensitivity cases.
...
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-10 17:19:44 +01:00
Damjan Jovanovic
eba4f333b9
ntdll: Treat smbfs as case-insensitive on FreeBSD.
...
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-10 17:19:44 +01:00
Damjan Jovanovic
9ba13fbca6
ntdll: Msdosfs was case-insensitive since FreeBSD 8 or even earlier.
...
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-10 17:19:44 +01:00
Damjan Jovanovic
d1c8611886
ntdll: FAT filesystems are called "msdosfs" on FreeBSD >= 5.
...
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-10 17:19:44 +01:00
Damjan Jovanovic
4e6621f3a6
ntdll: Fix wrong return values in get_dir_case_sensitivity_stat().
...
It should be returning TRUE (= case sensitive) on failure as case
sensitive is the safe assumption, but some returns are FALSE on
failure and even TRUE when case insensitive. Fix that.
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-10 17:19:44 +01:00
Damjan Jovanovic
bf8da00ee0
ntdll: Improve character device type detection on FreeBSD and macOS.
...
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-09 20:15:11 +01:00
Damjan Jovanovic
a563f584f5
ntdll: Implement get_thread_times() on FreeBSD.
...
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-09 20:15:11 +01:00
Brendan Shanks
f40195cd92
dbghelp: Use PEB->CloudFileFlags instead of PEB->Reserved for debug base address.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50077
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-02 22:06:52 +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
Zebediah Figura
6257da8b42
ntdll: Don't check "info" for NULL in NtQuerySystemInformation(SystemModuleInformation).
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-27 09:51:25 +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
Zebediah Figura
ab1469597a
ntdll: Stub NtQuerySystemInformation(SystemExtendedProcessInformation).
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46870
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-26 20:27:44 +01:00
Joachim Priesner
e533a26dcf
ntdll: Fix read buffer overflow in find_file_in_dir().
...
Signed-off-by: Joachim Priesner <joachim.priesner@web.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-22 22:02:03 +02:00
Paul Gofman
36dcb69651
ntdll: Fix xmm registers copy offset in call_consolidate_callback() on x86_64.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50010
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-22 22:02:03 +02:00
Nikolay Sivov
d3ce5fff85
ntdll/actctx: Handle empty <dependency> element.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-20 22:54:01 +02:00
Alexandre Julliard
54c31d5332
ntdll: Make NtGetNlsSectionPtr() into a proper Nt syscall.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-15 20:18:01 +02: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
Paul Gofman
419abd49a1
ntdll: Support AVX registers for other thread in Nt{Get|Set}ContextThread().
...
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
ec1ea1ea1b
ntdll: Call FLS callbacks.
...
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
7341f4ad1e
ntdll: Zero all FLS slots instances in RtlFlsFree().
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-13 20:44:38 +02:00
Paul Gofman
53f7cb3c08
ntdll: Always align stack in call_user_apc_dispatcher() on x86_64.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49860
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-13 11:31:39 +02:00
Paul Gofman
4039c5ad47
ntdll: Don't use PEB lock for FLS data.
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-08 12:40:30 +02:00
Paul Gofman
87ea7698ab
ntdll: Allocate TEB FLS data in LdrInitializeThunk().
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-08 12:40:30 +02:00
Paul Gofman
905deff5da
ntdll: Reimplement FLS data management on top of up to date structures.
...
Win10 18132 introduced increased FLS data limit and entirely changed
underlying structure.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-08 12:40:29 +02:00
Paul Gofman
36981ad033
ntdll: Introduce RtlProcessFlsData() and use it for FLS data destruction.
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-08 12:40:29 +02:00
Martin Storsjo
0a6e46e436
ntdll: Fix nested exceptions on arm64.
...
This mirrors ae07938ba6
(from x86_64)
to arm64.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-06 11:57:05 +02:00
Martin Storsjo
b09acd526d
ntdll: Clear ExceptionFlags on arm64 after running an exception handler.
...
This applies the beahviour from a69762541a
(on x86_64) to arm64 as well.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-06 11:57:03 +02:00
Sven Baars
973b0e1dfc
ntdll: Fix a memory leak (Valgrind).
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49904
Signed-off-by: Sven Baars <sbaars@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-05 20:54:23 +02:00
Martin Storsjo
dcf3874e00
ntdll: Restore the original Lr value when unwinding through raise_func_trampoline on arm64.
...
When a signal is raised in a leaf function (that hasn't backed up
the Lr register itself), we need to restore both Pc and Lr separately.
This doesn't seem to be possible via libunwind, so add a special case
unwinding rule for this function.
As we have a special case for the function, we could also just as well
skip normal dwarf unwinding for this function altogether and just
restore the full context from the stack.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-05 12:33:31 +02:00
Martin Storsjo
df794f3425
ntdll: Unwind to the LR register if no unwind info is available.
...
Try to keep the behaviour from ea9f47a767
of erroring out if
unwinding ends up out of bounds (with pc==lr, where setting pc
to lr doesn't progress the unwind), but support unwinding from
functions without unwind info.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-05 12:33:31 +02:00
Paul Gofman
defcbc8b97
kernelbase: Move FlsGetValue() implementation to ntdll.RtlFlsGetValue().
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-01 11:43:53 +02:00
Paul Gofman
e596f4047b
kernelbase: Move FlsSetValue() implementation to ntdll.RtlFlsSetValue().
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-01 11:43:07 +02:00
Paul Gofman
0627fa9d92
kernelbase: Move FlsFree() implementation to ntdll.RtlFlsFree().
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-01 11:43:03 +02:00
Paul Gofman
c955eee9e8
kernelbase: Move FlsAlloc() implementation to ntdll.RtlFlsAlloc().
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-01 11:42:58 +02:00
Alexandre Julliard
0167e195e9
ntdll: Fix handle/module confusion in Unix module loading.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-30 15:38:08 +02:00
Alexandre Julliard
e5c0e8e296
ntdll: Use load_dll() to load kernel32 to support PE format.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-28 19:38:42 +02:00
Alexandre Julliard
7cec3dc284
ntdll: Use the standard code path to load ntdll.dll.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-28 19:38:42 +02:00
Alexandre Julliard
20e0fd6e99
ntdll: Delay ntdll.dll loading until more initialization is done.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-28 19:38:42 +02:00
Alexandre Julliard
e055a3ee05
configure: Require 64-bit compare-and-swap support from gcc.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49191
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-28 17:03:57 +02:00
Louis Lenders
595600b6c1
ntdll: Bump Win 10 version to 17763.
...
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-28 13:23:44 +02:00
Michael Müller
d0bea3d702
server: Implement support for creating a process with a specified token.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-24 15:21:43 +02:00
Zebediah Figura
6cf3561ff3
ntdll: Pass the token to NtCreateUserProcess().
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-24 15:18:44 +02:00
Michael Müller
8c5638aa5e
ntdll: Implement NtFilterToken.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-23 15:58:10 +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
Nikolay Sivov
c58a10c163
server: Implement inherited handles list.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-22 14:04:45 +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
Alexandre Julliard
9c8dce2155
ntdll: Don't lock mutexes during process exit.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-22 11:28:41 +02:00
Alexandre Julliard
d8f7d54573
ntdll: Add inline wrappers for pthread mutex locking.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-22 11:28:25 +02:00
Jacek Caban
54e117018c
kernelbase: Use conhost to handle Unix consoles.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-21 19:24:19 +02:00
Jacek Caban
0957f9302c
ntdll: Fill console size in get_initial_console.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-21 19:24:19 +02:00
Jacek Caban
6bcc1b9225
ntdll: Pass RTL_USER_PROCESS_PARAMETERS to get_initial_console.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-21 19:24:19 +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
Francois Gouget
a9722145a8
ntdll: Fix the spelling of the arch_context_parameters variable.
...
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-21 19:24:19 +02:00
Alexandre Julliard
a014f413d6
ntdll: Add support for loading a Unix helper library from builtin dlls.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-21 13:41:28 +02:00
Sven Baars
123a4a884f
ntdll: Fix some memory leaks (Valgrind).
...
Signed-off-by: Sven Baars <sbaars@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-21 12:57:37 +02:00
Alexandre Julliard
2eed0cdb8f
include: Don't use IsBadStringPtr in debug functions for Unix libraries.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-18 15:13:42 +02:00
Martin Storsjo
2693e6662d
ntdll: Implement __C_specific_handler and _local_unwind for arm64.
...
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-17 20:54:16 +02:00
Stefan Dösinger
4d33a0410e
ntdll: Use the MacOS file handle limit workaround from libs/wine/loader.c.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49624
Signed-off-by: Stefan Dösinger <stefan@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-14 19:42:40 +02:00
Alexandre Julliard
3cd3b77522
ntdll: Update argc when changing process name.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49834
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-14 19:42:40 +02:00
Alexandre Julliard
1dd3051cca
makefiles: Generate a single non-recursive makefile at the top level.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-14 19:42:39 +02:00
Chao Long
655ab7a84f
ntdll: Fix a ImagePathName memory leak (Valgrind).
...
Signed-off-by: Chao Long <longchao@uniontech.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-10 21:56:34 +02:00
Chao Long
d0946955ec
ntdll: Fix a memory leak (Valgrind).
...
Signed-off-by: Chao Long <longchao@uniontech.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-09 20:30:50 +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
Alexandre Julliard
a204ad557d
makefiles: Expand makedep path at compile time.
...
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
Alexandre Julliard
cc9d69b20b
ntdll: Pop the Unix stack completely in call_user_apc_dispatcher().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-04 21:16:49 +02:00
Martin Storsjo
36ebdfc6b6
ntdll: Add ARM64 SEH unwind directives for assembly functions in PE builds.
...
This fixes unwinding through RtlRaiseException and
call_consolidate_callback in PE builds.
Adjust the call_consolidate_callback function to store the whole
context on the stack, and use the seh "context" opcode for
unwinding to that context instead of the parent. Adjust the dwarf
escape codes for reading from the context on the stack.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-04 15:47:27 +02:00
Martin Storsjo
5bbd8130ad
ntdll: Don't truncate SP in arm64 handle_syscall_fault.
...
This seems to be a copypaste typo from 0b3db9dfa2
.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-04 15:42:18 +02:00
Martin Storsjo
d99a454a6b
ntdll: Fix arm64 regression from "Clear the syscall frame on return".
...
The restoring of registers in call_user_exception_dispatcher
was broken in 75e616d52b
.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-04 15:42:15 +02:00
Alexandre Julliard
2d91f7def1
ntdll: Load libwine dynamically.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-03 12:30:41 +02:00
Alexandre Julliard
4e80f2ea5e
ntdll: Add a helper function to try an mmap at a fixed address.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-03 10:54:17 +02:00
Alexandre Julliard
72b97eeba0
ntdll: Add a helper function for memory allocations through mmap().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-03 10:52:11 +02:00
Alexandre Julliard
74deee7df0
ntdll: Add a helper function for fixed anonymous mmaps.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-03 10:51:09 +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
30e5250622
ntdll: Implement saving AVX registers in NtGetContextThread().
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-02 16:30:04 +02:00
Alexandre Julliard
5b4b877488
ntdll: Move the reserved area functions to avoid forward declarations.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-02 16:30:03 +02:00
Alexandre Julliard
7b96e82fd5
ntdll: Make the reserved area functions static.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-02 16:30:03 +02:00
Alexandre Julliard
4c45348f78
ntdll: Get rid of the exec_process() Unix library callback.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-02 15:24:01 +02:00
Alexandre Julliard
f51cd0a1b5
ntdll: Use the process parameters directly in exec_process().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-02 15:09:33 +02:00
Alexandre Julliard
52e9baddbc
ntdll: Move the NT path conversion for exec process to the Unix library.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-02 14:46:14 +02:00
Alexandre Julliard
9e973954fd
ntdll: Get rid of the server_init_process_done() Unix library callback.
...
This time without setting Eip to 0.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-01 18:40:08 +02:00
Alexandre Julliard
f7e4fd0cf8
kernel32: Remove the no longer used __wine_start_process() function.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-01 16:41:03 +02:00
Alexandre Julliard
c2c330532e
ntdll: Call the process entry point through RtlUserThreadStart().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-01 16:41:03 +02:00
Alexandre Julliard
1a9558cf9b
ntdll: Call the thread entry point through BaseThreadInitThunk().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-09-01 16:41:03 +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
Louis Lenders
518d06404a
ntdll: RtlConvertToAutoInheritSecurityObject is NTSTATUS, not BOOL.
...
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-31 22:09:20 +02:00
Paul Gofman
8aa370e991
ntdll: Clear CONTEXT_XSTATE flag in RtlUnwindEx().
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49749
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-31 21:41:07 +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
Alexandre Julliard
2b9a0550bc
Revert "ntdll: Get rid of the server_init_process_done() Unix library callback."
...
This partially reverts commit 1581fb619b
.
Steam wants Eip to be valid even before LdrInitializeThunk.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-28 21:08:45 +02:00
Alexandre Julliard
3863b243fe
ntdll: Clear the thread stack by hand instead of remapping zero pages.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-27 12:24:05 +02:00
Alexandre Julliard
75e616d52b
ntdll: Clear the syscall frame on return instead of popping the previous one.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-27 12:14:35 +02:00
Alexandre Julliard
65c37cee24
ntdll: Use exported APIs instead of virtual_map_section() to load PE modules.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-26 14:16:54 +02:00
Alexandre Julliard
1581fb619b
ntdll: Get rid of the server_init_process_done() Unix library callback.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-26 13:04:09 +02:00
Martin Storsjo
a9639dd605
ntdll: Capture vector registers in arm64 RtlCaptureContext.
...
Since 5b3842451b
we set the flag indicating that the context
contained float registers, but we didn't actually populate them yet.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-25 19:31:44 +02:00
Martin Storsjo
99a6ae5b86
ntdll: Fix arm64 jump buffer float restoration.
...
Fix a typo in copying fields from the jump buffer to the context,
use the right type of long in the struct.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-25 19:31:44 +02:00
Alexandre Julliard
a8ddcf7dfe
ntdll: Use syscalls for a couple of Wine internal functions.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-25 19:31:43 +02:00
Alexandre Julliard
af1a328fa0
ntdll: Use syscalls for the Wine version functions.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-25 19:31:43 +02:00
Alexandre Julliard
482b64effd
ntdll: Use syscalls for the file path conversion functions.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-25 13:57:19 +02:00
Alexandre Julliard
4e5811637a
ntdll: Use syscalls for the server functions.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-25 13:55:40 +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
Alexandre Julliard
97847eeee8
ntdll: Avoid referencing winecrt0 exception handlers from the Unix library.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-24 22:14:44 +02:00
Alexandre Julliard
6844ff8a0b
ntdll: Stop resolving imports for the Unix library.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-24 22:14:44 +02:00
Alexandre Julliard
0b3db9dfa2
ntdll: Handle page faults happening during a syscall without dispatching the exception.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-24 11:46:22 +02:00
Zebediah Figura
8bd95a80f2
ntdll: Read the condition variable and manipulate the lock on the PE side.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49712
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-24 11:17:04 +02:00
Paul Gofman
057e7f1940
ntdll: Also save unwind info for rbp in call_consolidate_callback() on x64.
...
Fixes Bloons TD 6 crash on start.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-24 11:16:40 +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
Martin Storsjo
5b3842451b
include: Update ARM64 context flag definitions to match current SDKs.
...
CONTEXT_FLOATING_POINT should be included in CONTEXT_FULL, and
there's a new flag CONTEXT_ARM64_X18 (not available without
the arch specific prefix) that only is part of CONTEXT_ALL.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-21 15:01:56 +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
Paul Gofman
de1cb029f6
include: Define _XSAVE_FORMAT structure.
...
The structure is defined for both x86_64 and i386 (along with
M128A) in (newer) Windows SDK.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-20 18:49:38 +02:00
Paul Gofman
25d4c50db3
ntdll: Remove redundant ldmxcsr in set_full_cpu_context() on x86_64.
...
Mxcsr will be overwritten anyway by consequent fxrstor.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-20 18:49:26 +02:00
Alexandre Julliard
77fbf3a9fd
ntdll: Unwind the syscall frame in NtSetContextThread().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-20 18:45:53 +02:00
Alexandre Julliard
a686759f1d
ntdll: Unwind the syscall frame when calling KiUserApcDispatcher().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-20 18:45:53 +02:00
Alexandre Julliard
53e0bf2f9f
ntdll: Don't expect LdrInitializeThunk() to return to the Unix side.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-20 18:45:53 +02:00
Alexandre Julliard
4a7cd0f492
ntdll: Call NtContinue() from LdrInitializeThunk() instead of returning.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-20 18:23:44 +02:00
Paul Gofman
f332f2e4e2
ntdll: Don't transfer xmm registers explicitly during context save and restore on x64.
...
fxsave / fxrstor already do that.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-19 10:16:57 +02:00
Paul Gofman
525e7078a8
ntdll: Report newer vector processor features on x86 / x64.
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-19 10:15:45 +02:00
Martin Storsjo
8f3bd63b52
ntdll: Fix arm64 sigcontext access for darwin.
...
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-18 22:33:39 +02:00
Martin Storsjo
7f8224411c
ntdll: Fix the arm64 use of libunwind for macOS.
...
MacOS uses the LLVM libunwind, which doesn't expose quite as much
internals of the cursor as GNU libunwind, and uses slightly different
names for the arch specific register enums (for get/set registers).
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-18 22:33:34 +02:00
Martin Storsjo
cffd06ea67
ntdll: Trust libunwind's returned pc value on arm64.
...
Use this instead of manually copying LR to PC. With GNU libunwind,
both registers are equal after unw_step.
With the LLVM libunwind (which Apple uses), the return address isn't
reflected at all in LR, only in UNW_REG_IP.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-18 22:32:27 +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
Martin Storsjo
e8f2c2464a
ntdll: Only call putenv() if we are going to call exec().
...
If we aren't going to exec (if pre_exec() returns zero), we will
continue using the envp pointer we got from the caller. However,
the putenv() call does update the environment, and this can in
some cases overwrite the array that the old (stale, potentially
dangling) envp pointer points to.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-14 22:04:02 +02:00
Martin Storsjo
00b4a51fcc
ntdll: Remove a stray duplicate instruction.
...
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-14 22:02:04 +02:00