Commit Graph

4588 Commits

Author SHA1 Message Date
Rémi Bernon be48a56e70 ntdll: Clarify NtMapViewOfSection zero_bits parameter semantics.
See 00451d5edf.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-20 22:32:42 +02:00
Rémi Bernon bec9a63f7a ntdll/tests: Add more NtMapViewOfSection tests with zero_bits.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-20 22:32:42 +02:00
Rémi Bernon d1b7e01e5e ntdll/tests: Move NtMapViewOfSection tests from kernel32/tests.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-20 22:32:40 +02:00
Rémi Bernon 3acc123ed3 ntdll/tests: Cleanup NtAllocateVirtualMemory related tests.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-20 22:23:03 +02:00
Alexandre Julliard a226e2b7a9 ntdll: Use .so builtin if found instead of falling back to the installed PE file.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-19 11:47:34 +02:00
Alexandre Julliard bdd48b41d3 ntdll: Make the standard C functions available for importing.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-18 23:51:51 +02:00
Alexandre Julliard c911eff7b4 ntdll: Make wine_server_call() cdecl.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-18 23:51:51 +02:00
Zebediah Figura 16eb17bb0a ntdll/tests: Add tests for RtlCreateUserStack().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-17 20:52:34 +02:00
Zebediah Figura 90c3b78bec ntdll: Implement RtlCreateUserStack() and RtlFreeUserStack().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-17 20:50:10 +02:00
Gabriel Ivăncescu 0639d182e5 ntdll: Add support for EXT4 per directory case folding.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-17 12:49:22 +02:00
Rémi Bernon 00451d5edf ntdll: Clarify NtAllocateVirtualMemory zero_bits parameter semantics.
This parameter was misinterpreted as an alignment parameter for the
lower bits of the allocated memory region, although it is a constraint
on the higher bits.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-13 20:55:35 +02:00
Alexandre Julliard 70e1f845c7 ntdll: Make the __wine_spec_unimplemented_stub() copy cdecl.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-12 22:38:52 +02:00
Zebediah Figura 07e86d3c9d ntdll: Try to avoid an unnecessary syscall in fast_release_srw_exclusive().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-11 18:20:31 +02:00
Zebediah Figura e2411ebecb ntdll: Add a futex-based implementation of SRW locks.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-11 18:20:24 +02:00
Zebediah Figura d741296676 ntdll: Remove no longer used interlocked_dec_if_nonzero().
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-11 18:19:40 +02:00
Rémi Bernon 8878492d3b ntdll/tests: Add NtAllocateVirtualMemory tests for zero_bits behavior.
The zero_bits parameter doesn't behave as expected, and some 64bit code
use it to allocate memory in the lower 32bit address space.

The expected full behaviour is:

* zero_bits == 0: no constraint on address range
* 0 < zero_bits <= 15: returned address should have as many upper bits
                       set to 0, starting at bit 31. In 64bit mode,
                       upper 32bits should all be 0 as well.
* 15 < zero_bits <= 31: unsure, but probably same as zero_bits == 15.
* zero_bits > 31: (64bit/WoW64 only) zero_bits behaves as a bitmask, as
                  if it was set to the number of leading 0 in the
                  bitmask, works in the whole 64bit range.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-11 18:18:49 +02:00
Rémi Bernon f39c1eee49 ntdll/tests: Move NtAllocateVirtualMemory tests that were in kernel32.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-11 18:18:39 +02:00
Alexandre Julliard c36b3d3e4a ntdll: Don't use native subsystem heuristic against builtin modules.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-11 18:15:31 +02:00
Alexandre Julliard 9019c12fac ntdll: Load the file we got when we can't locate the corresponding builtin.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-05 21:40:55 +02:00
Alexandre Julliard 370abd32d1 ntdll: Add a helper function to load a dll from a .so file.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-05 21:40:55 +02:00
Alexandre Julliard 295f10aa80 ntdll: Add a helper function to find a module from its dlopen handle.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-05 17:26:35 +02:00
Alexandre Julliard d96fd000d3 ntdll: Fix off-by-one allocation error.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47311
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-03 10:28:29 +02:00
Sven Baars 539ebebc94 ntdll/tests: Fix a string leak (Valgrind).
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-31 21:32:26 +02:00
Huw Davies 13e11d3fcb kernel32: Move the implementation of GetTickCount() to kernel32.
Fixes regression caused by 3e927c4aec.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47265
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-30 21:53:27 +02:00
Alexandre Julliard 60df3b14b5 include: Make the Wine exception handlers cdecl.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-30 15:04:06 +02:00
Alexandre Julliard 1943fb29bf ntdll: Don't pass DLL_WINE_PREATTACH to the TLS callbacks.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-24 11:25:44 +02:00
Jacek Caban a55a287cab server: Always block overlapped device requests until driver dispatches them.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-23 22:18:32 +02:00
Jacek Caban c09a903bfa ntdll: Introduce wait_async helper.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-23 22:18:31 +02:00
Alexandre Julliard b8743f1f0b ntdll: Set LDR_WINE_INTERNAL flag also for PE builtins.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-20 10:15:17 +02:00
Alexandre Julliard 6c41cc6152 winebuild: Support relay debugging for PE builtin dlls.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-16 22:55:50 +02:00
Huw Davies 3e927c4aec ntdll: Extend NtGetTickCount() to return 64-bits. Forward kernel32 functions to it.
Marking the function as DECLSPEC_HOTPATCH to avoid reopening
https://bugs.winehq.org/show_bug.cgi?id=36486 .  Even with -fno-PIC,
without DECLSPEC_HOTPATCH the generated code has a pushl at offset 7
that triggers the failure.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-16 20:54:23 +02:00
Huw Davies 6b47a72e4a ntdll: Mark monotonic_counter() as inline.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-16 20:54:23 +02:00
Alexandre Julliard 170bd8f361 include: Pass function name directly to the __ASM_STDCALL macro.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-16 19:00:10 +02:00
Alexandre Julliard 10584d2057 include: Use the __fastcall attribute directly for the Windows build.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-16 14:07:15 +02:00
Martin Storsjo 044461e8a6 ntdll: Avoid truncating a nonzero exit code to zero in unix.
On Windows, the exit codes can use the full 32 bit range, while
on unix, they are truncated to the lowest 8 bits. If the intended
exit code is nonzero, to indicate failure, but the lower 8 bits
are zero (like when winedbg tries to exit with EXCEPTION_WINE_STUB,
80000100), the observed exit code used to be zero, indicating
successful execution.

Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-15 22:04:39 +02:00
Hans Leidekker 4872747b27 ntdll: Fix breakpoint exception address on 64-bit Linux.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-15 22:04:39 +02:00
Alexandre Julliard 62fa748f23 include: Define fastcall assembly wrappers globally.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-15 19:59:33 +02:00
Huw Davies 5c8ea25014 ntdll: Use CLOCK_REALTIME_COARSE for NtQuerySystemTime() if it has sufficient resolution.
This will only affect users running with HZ=1000.  On an i7-8700 CPU @
3.20GHz it cuts the call cost from ~30ns to ~12ns.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-14 20:26:46 +02:00
Huw Davies aa4570fedd ntdll: Implement RtlGetSystemTimePrecise().
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-14 20:24:45 +02:00
Alexandre Julliard d5a372abbb include: Move inline assembly definitions to a new wine/asm.h header.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-14 13:45:07 +02:00
Alexandre Julliard 6fc259a57d ntdll: Use strncmpiW instead of memicmpW for strings without embedded nulls.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-08 08:34:32 -05:00
Alexandre Julliard 6466a17a8e ntdll: Reset stdio file descriptors when passed invalid handles.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-07 15:03:58 -05:00
Alexandre Julliard 7c0385bdb4 ntdll: Check for time conversion error to silence a compiler warning.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-30 20:25:11 +02:00
Nikolay Sivov fe0f8a150f ntdll: Initialize critical section debug info with correct pointer value.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-30 20:08:04 +02:00
Nikolay Sivov 9fcb2c8822 ntdll: Account for null terminating char in unload traces (Coverity).
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-30 20:05:27 +02:00
Michael Stefaniuc 21f3bf53dc ntdll/tests: Avoid the comma operator.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-29 22:23:34 +02:00
Jacek Caban c448550e74 ntoskrnl.exe/tests: Add more NtOpenThread tests.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-23 23:50:45 +02:00
Alexandre Julliard 70d17d3929 ntdll: Use the correct type for %llu scanf format.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-23 23:50:45 +02:00
Nikolay Sivov 5431409bd3 ntdll: Implement RtlGetUnloadEventTrace()/RtlGetUnloadEventTraceEx().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-23 23:50:44 +02:00
Nikolay Sivov 91763843b7 ntdll/tests: Add some tests for unloaded modules traces.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-23 23:50:44 +02:00
Vijay Kiran Kamuju 99ba65a1ea ntdll: Report system information SystemPerformanceInformation info class.
Based on patch from Michael Müller.

Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-22 19:48:28 +02:00
André Hentschel ed968c23d6 ntdll: Reuse signal to trap translation for FreeBSD on ARM.
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-22 19:48:28 +02:00
Alexandre Julliard 948fc85186 ntdll: Add support for loading PE builtin dlls.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-22 11:40:33 +02:00
Alexandre Julliard ea9cc97e2e ntdll: Only pass the NT path name to open_dll_file().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-22 11:36:39 +02:00
Alexandre Julliard f7cf3c1806 ntdll: Move open_dll_file() to avoid forward declarations.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-22 11:34:55 +02:00
Alexandre Julliard 546fa12755 server: Add flag for builtin dlls in the image information.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-22 11:34:25 +02:00
Nikolay Sivov 19bf03ed4b ntdll: Add NtSuspendProcess()/NtResumeProcess() implementation.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-19 12:13:36 +02:00
Louis Lenders 89bfcfc645 ntdll: Add DECLSPEC_HOTPATCH to NtQueryValueKey.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45703
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-19 12:02:58 +02:00
Nikolay Sivov f9301c2b66 ntdll/tests: Add some tests for thread suspend/resume.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-15 21:33:07 +02:00
Louis Lenders 3a0ffe5a37 ntdll: Add DECLSPEC_HOTPATCH to NtQueryDirectoryFile.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45703
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-15 12:50:25 +02:00
Zhiyi Zhang b193e6a787 ntdll/tests: Test readonly file access.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-11 19:29:42 +02:00
André Hentschel 4bfc2c32ff ntdll: Translate signal to trap when trap code is 0 on ARM.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46187
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-10 08:58:16 +02:00
Alexandre Julliard 1459a0105d makefiles: Default to building test modules as PE.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-09 15:45:59 +02:00
Alexandre Julliard a184ce483b ntdll: Avoid using DPRINTF().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-08 19:34:09 +02:00
Zebediah Figura 7dc459f3d1 ntdll: Avoid crashing while tracing parameters to NtCreateNamedPipeFile().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-08 09:55:23 +02:00
André Hentschel abca25b30f ntdll: Adjust PC according to THUMB/ARM flag.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46189
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-05 22:16:31 +02:00
Thomas J. Moore 071e729969 ntdll: Also try to stat() the drive root.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46863
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-05 22:16:31 +02:00
Alexandre Julliard bb83b68832 ntdll: Define IsBadStringPtr to handle exceptions in debug traces.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-04 11:34:04 +02:00
Alexandre Julliard c9bf52502c ntdll: Store offsets instead of pointers in the debug_info structure.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-03 19:28:19 +02:00
Alexandre Julliard f438ff566d ntdll: Remove no longer used debug functions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-03 19:28:19 +02:00
Alexandre Julliard cf8193df5b include: Make wine_dbg_log() into an inline function.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-03 19:27:50 +02:00
Alexandre Julliard 9911cfdeae ntdll: Export __wine_dbg_get_channel_flags().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-03 19:27:50 +02:00
Alexandre Julliard ddf1ff2f6a include: Make wine_dbg_printf() into an inline function.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-03 19:27:50 +02:00
Alexandre Julliard 9f75f71899 include: Make wine_dbgstr_an()/wine_dbgstr_wn() into inline functions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-03 19:23:43 +02:00
Alexandre Julliard b3c8d5d368 ntdll: Use static debug info before initialization is done.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-03 10:02:04 +02:00
Detlef Riekenberg 4b7d2ea0a7 ntdll/tests: Fix failures in the file tests.
Signed-off-by: Detlef Riekenberg <wine.dev@web.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-03 09:39:12 +02:00
André Hentschel 0e26aaa3ed ntdll: Add stub for RtlInstallFunctionTableCallback on ARM/ARM64.
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-01 23:25:49 +02:00
Andrew Eikum 12be24af8c ntdll: Fix memory region check in NtQueryVirtualMemory.
Patch by buggy@ifel.se.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45218
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-27 22:04:01 +01:00
Piotr Caban 2eb1849100 kernel32: Don't use strcasecmp.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-27 22:01:31 +01:00
Piotr Caban 09e6aa4b88 ntdll: Use RtlUpperChar in _strupr implementation.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-27 22:01:07 +01:00
Alexandre Julliard 0dbca5803b ntdll/tests: Mark as broken a test that fails on win2003.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-27 08:50:45 +01:00
Piotr Caban a799d41687 ntdll: Don't use toupper in RtlIsNameLegalDOS8Dot3 tests.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-26 13:50:24 +01:00
Piotr Caban 073bb1d0b4 ntdll: Use NTDLL_tolower instead of toupper.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-26 13:50:22 +01:00
Piotr Caban 3588e5abd4 ntdll: Use _stricmp instead of strcasecmp.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-26 13:50:20 +01:00
Piotr Caban 9b52a967b7 ntdll: Fix _strnicmp implementation to not depend on locale.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-26 13:50:11 +01:00
Piotr Caban 9851785783 ntdll: Use NTDLL_tolower in _strlwr.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-26 13:50:09 +01:00
Piotr Caban f9ee9e63a5 ntdll: Use NTDLL_tolower in _memicmp.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-26 13:50:07 +01:00
Piotr Caban 748628e23e ntdll: Use ANSI code page in toupper.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-26 13:50:05 +01:00
Piotr Caban 4ed7924390 ntdll: Fix tolower implementation to not depend on locale.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-26 13:49:56 +01:00
Alexandre Julliard 25ff59d7a9 ntdll: Default to 7-bit ASCII before codepages are initialized.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-22 19:45:39 +01:00
Derek Lesho 3d0cf846f9 ntdll: Fix unwinding from leaf function on x86_64.
Signed-off-by: Derek Lesho <dereklesho52@Gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-20 22:42:30 +01:00
Nikolay Sivov 733b438583 ntdll/threadpool: Add support for callback priority.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-13 10:59:50 +01:00
Jacek Caban 7ba361b47b ntdll: Add support for returning previous state argument in event functions.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-12 20:34:35 +01:00
Jacek Caban d3660e5901 ntdll: Fix event op functions declarations.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-12 20:33:41 +01:00
Jacek Caban a9d9d585a7 ntdll/tests: Add more event op tests.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-12 20:33:23 +01:00
Alexandre Julliard 2ae84d5240 Avoid using Windows includes that are already handled in wine/port.h.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-12 20:19:00 +01:00
Paul Gofman 730b47e530 ntdll: Return STATUS_PENDING from NtReadFile() for async read with regular file.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=43071
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-07 17:53:55 +01:00
Paul Gofman fb5bf0ec8a ntdll/tests: Mark sync NtReadFile() result for async regular file as broken.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-07 17:53:32 +01:00
Paul Gofman 56f34c7489 ntdll: Return STATUS_PENDING from NtWriteFile() for async write with regular file.
This matches Vista+ behaviour.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=42982
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-06 22:26:55 +01:00
Paul Gofman 53c0eef15f ntdll/tests: Mark sync NtWriteFile() result for async regular file as broken.
Vista+ always return async status.

Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-06 22:22:49 +01:00
Paul Gofman bd9cdb3b65 ntdll: Mark 'float_status' as input operand in save_fpu().
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-06 18:28:20 +01:00
Paul Gofman c6cd92bedd ntdll: Avoid resetting x87 FPU state when saving context.
'FNSAVE' x87 instruction resets the FPU state to default values
(like FINIT). This results in FPU state reset to default in any
ntdll call which is getting x87 FPU state, e. g. obtaining context
or raising an exception.

Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-04 14:49:51 +01:00
Paul Gofman fddea78ac1 ntdll/tests: Add test for preserving x87 fpu state when capturing context.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-04 14:49:48 +01:00
Brendan McGrath 87917df887 kernel32: Allow double quote style escape in argv.
Two quotes together (within outer quotes) represents a single
quote (with the first quote acting as an escape character)

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46721
Signed-off-by: Brendan McGrath <brendan@redmandi.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-04 13:13:29 +01:00
Michael Stefaniuc a4ff7ea2b4 ntdll/tests: Avoid using the comma operator.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-04 12:26:06 +01:00
Alexandre Julliard 26bbbb7b73 winebuild: Use stdcall for fastcall wrappers.
This allows catching mismatched argument lists.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-01 17:48:26 +01:00
Alexandre Julliard 24721eccac ntdll: Use the fastcall flag for RtlInterlockedPushListSList.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-28 21:37:29 +01:00
Alexandre Julliard 9c9efd7068 ntdll: Support relay debugging of fastcall entry points.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-27 23:01:31 +01:00
Jacek Caban 6531f79d8d server: Return proper object type for mailslot and device files.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-22 14:27:25 +01:00
Jacek Caban c55c4ab88c server: Support token object type.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-22 14:27:22 +01:00
Jacek Caban eea7702eb6 server: Support thread object type.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-22 14:27:19 +01:00
Jacek Caban 2bb4d24589 server: Support process object type.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-22 14:27:16 +01:00
Jacek Caban 372852a2a8 ntdll/tests: Introduce test_object_type helper.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-22 14:27:13 +01:00
Michael Stefaniuc 244c15fe7b ntdll: Remove redundant not-NULL check (coccinellery).
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-22 12:27:16 +01:00
Paul Gofman ba42efdb14 ntdll: Pass async parameter to add_fd_completion server call.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-21 16:07:07 +01:00
Paul Gofman e2f46a604f ntdll/tests: Test ReadFile() completion status with FILE_SKIP_COMPLETION_PORT_ON_SUCCESS.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Jacek Caban<jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-21 16:07:01 +01:00
Paul Gofman 7ce2a8e0ae ntdll: Return STATUS_PENDING from NtReadFile() for async read in case of no buffering.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=31954
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-19 13:10:22 +01:00
Paul Gofman 9dc63ca981 ntdll/tests: Add more tests for overlapped file read.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-19 13:10:22 +01:00
Gijs Vermeulen d2d52717af ntdll: Validate len in NtQueryVirtualMemory.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45632
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-18 16:03:59 +01:00
Alexandre Julliard 20a2cc9751 ntdll: Store extended FPU state and debug registers in RtlRaiseException().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-14 19:53:25 +01:00
Alexandre Julliard edbdec441b ntdll: Store extended FPU context in NtGetContextThread().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-14 19:53:25 +01:00
Alexandre Julliard 5ecea50170 ntdll: Make the CPU information global.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-14 19:53:25 +01:00
Alexandre Julliard 9f0d669239 ntdll: Rename attach_dlls() to LdrInitializeThunk().
Based on a patch by Andrew Wesie.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-14 17:57:09 +01:00
Alexandre Julliard 42df4dccd5 ntdll: Return the kernel process start address from __wine_kernel_init().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-14 17:57:09 +01:00
Alexandre Julliard 12a9b6d407 ntdll/tests: Add tests for initial process parameters layout.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-13 19:45:24 +01:00
Alexandre Julliard a95d7f6c4f ntdll: Recreate the process parameters structure once everything has been initialized.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-13 19:45:24 +01:00
Alexandre Julliard 50f0ed75ef ntdll: Also create the initial process parameters with RtlCreateProcessParametersEx().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-13 12:48:36 +01:00
Alexandre Julliard c0f693f6fc ntdll: Hardcode the path of the windows directory for redirects.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-12 23:02:28 +01:00
Alexandre Julliard 7a122604ea ntdll: Reimplement init_user_process_params() using RtlCreateProcessParametersEx().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-12 11:31:53 +01:00
Alexandre Julliard 6abf99b480 ntdll: Use the current platform as processorArchitecture instead of a wildcard.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-12 10:59:39 +01:00
Alexandre Julliard 9839bb7691 ntdll: Skip dlls of the wrong machine type when searching through the load path.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-11 12:31:40 +01:00
Alexandre Julliard 2062df7e6c ntdll: Use the image info to check for fake dlls.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-11 12:31:39 +01:00
Alexandre Julliard f244c3b5eb server: Add custom flag for fake dlls in PE image information.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-11 12:30:37 +01:00
Alexandre Julliard f1bb3580e3 ntdll: Create the memory mapping for a dll directly at open time.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-11 12:30:35 +01:00
Alexandre Julliard c946922a9c ntdll: Directly try to open the dll file instead of checking for existence first.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-11 11:52:00 +01:00
Alexandre Julliard 4880a5a0f4 ntdll: Pass a flag instead of a file handle to load_builtin_dll().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-11 11:52:00 +01:00
Zebediah Figura be541f1b0c ntdll: Add a direct futex-based implementation of condition variables.
While the current path for condition variables will ultimately use futexes if
they are available, the path for address waits is vulnerable to several
spurious wakes, which can be obviated by using condition variables as futexes
directly.

This greatly improves performance for Path of Exile.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45524
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-11 11:52:00 +01:00
Alexandre Julliard f7b3120991 ntdll: Remove no longer used parameter from find_fileid_module().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-08 23:00:27 +01:00
Alexandre Julliard dc40bc85bc ntdll: Use NT filenames when loading dlls.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-08 22:20:26 +01:00
Alexandre Julliard e24b16247d ntdll: Pass an NT filename to get_load_order().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-08 22:19:47 +01:00
Alexandre Julliard 3099b04a89 ntdll: Return an NT filename in find_dll_file().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-08 22:18:16 +01:00
Alexandre Julliard a6e4c814b6 ntdll: Use an NT filename to search for loaded modules.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-08 22:18:16 +01:00
Zebediah Figura 954ed39584 ntdll: Reimplement condition variables on top of RtlWaitOnAddress().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46208
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-08 22:18:16 +01:00
Alexandre Julliard 6fb00db51e ntdll: Don't use current directory for libraries unless explicitly specified in the search path.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-06 19:57:27 +01:00
Zebediah Figura cc8f9b6419 ntdll: Add a futex-based implementation of WaitOnAddress().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-06 10:48:04 +01:00
Julien D'ascenzio 257850e7ec ntdll: Correct space/mark parity.
When CMSPAR is defined, the space and mark parity is reversed: the flag PARODD isn't set correctly.

Signed-off-by: Julien D'ascenzio <Julien.Dascenzio@paratronic.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-04 19:04:29 +01:00
Nikolay Sivov 9b90cfc281 ntdll: Make LdrFindResource_U() and LdrFindResourceDirectory_U() patchable.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-28 10:25:56 +01:00
Alexandre Julliard c87aa2b9fc ntdll: Support loading old runtime versions of IL-only images.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-25 15:29:53 +01:00
Alexandre Julliard 96eebec967 ntdll: Round header size to page boundary before checking it in PE header conversion.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-25 12:47:23 +01:00
Alexandre Julliard b61d425502 ntdll: Implement RtlIsProcessorFeaturePresent().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-24 17:33:37 +01:00
Alexandre Julliard 7f4e5b1ed8 ntdll: Don't crash on empty table in RtlAddFunctionTable().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-24 16:45:54 +01:00
Nikolay Sivov 067f6d7463 ntdll: Implement growable unwind tables API.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46479
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-23 17:17:18 +01:00
Nikolay Sivov 0cd5a68ca4 ntdll: Keep unwind table entry count instead of a size.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-23 17:17:09 +01:00
Nikolay Sivov 6f7731819c ntdll: Store range upper boundary for dynamic unwind entry.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-23 17:17:06 +01:00
Sven Baars ba3e07420e ntdll/tests: Fix some string leaks (Valgrind).
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-18 23:39:02 +01:00
Piotr Caban 9fa65a8751 server: Fix process trace_data initialization race on Mac.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-08 10:20:02 -06:00
Alexandre Julliard dc80a00329 ntdll: Also store FPU registers in RtlRaiseException().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=44485
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-02 23:02:25 +01:00
Dmitry Timoshkov c26b6afad3 kernel32: CreateDirectory shouldn't return ERROR_ACCESS_DENIED for the root of the drive.
According to the testbot results CreateDirectory("C:\\", NULL) fails
with ERROR_ACCESS_DENIED for not administrators. However with UAC enabled
and not and administrator account I get ERROR_ALREADY_EXISTS in that case
with Windows 7 64-bit running on real hardware. Moreover, Wine doesn't
really perform any access checks in that case and blindly assumes that
returning STATUS_ACCESS_DENIED is correct behaviour for the drive's root:
dlls/ntdll/directory.c,lookup_unix_name().

This patch fixes an application that can't find its data files because
after it receives ERROR_ACCESS_DENIED it stops further directory traversing.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-28 17:42:23 +01:00
André Hentschel 1b5b311cce ntdll: Use correct PC for instruction decoding on ARM64.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46194
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-24 20:12:25 +01:00
Zebediah Figura 1344dcee39 ntdll/tests: Fix a memory leak (Valgrind).
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-13 10:12:21 +01:00
Alexandre Julliard b3167770e7 ntdll/tests: Fix a test crash on latest Windows 10.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-11 15:55:34 +01:00
Akihiro Sagawa 67574e4440 wine.inf: Add MUI time zone name settings.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-07 18:07:54 +01:00
Akihiro Sagawa 434bc1baf5 ntdll: Use an MUI time zone name if available.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-06 19:22:48 +01:00
Roderick Colenbrander 3c329e28d9 ntdll: Print FIXME on systems supporting more CPU cores than supported.
Signed-off-by: Roderick Colenbrander <thunderbird2k@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-04 16:13:11 +01:00
Roderick Colenbrander b9af36933f ntdll: Fix parsing thread_siblings bitmaps on high core count systems.
Linux compiled for a high number of CPU cores, the bitmap is broken
into sections of 32-bit by commas. Handle parsing this.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45453
Signed-off-by: Roderick Colenbrander <thunderbird2k@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-04 16:13:11 +01:00
Roderick Colenbrander ed75a7b344 ntdll: Parse sysfs cpu_shared_map using helper function.
Signed-off-by: Roderick Colenbrander <thunderbird2k@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-04 16:13:11 +01:00
Zebediah Figura 6060d2703c ntdll: Use a critical section to ensure that RtlWaitOnAddress compares and queues atomically.
Currently a wake may occur between calling compare_addr() and performing the
select request; in that case the thread will never be woken. Prevent this by
taking a CS around both operations.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46099
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-04 16:13:10 +01:00
Zebediah Figura 0ea963a406 ntdll: Call the select request directly in RtlWaitOnAddress().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-04 16:13:10 +01:00
Sebastian Lackner a0ab2a7b0c loader: Implement preloader for macOS.
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-04 11:10:09 +01:00
Michael Müller 33b566c3d5 ntdll: Add stub for RtlGetUnloadEventTraceEx.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=44897
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-04 10:03:13 +01:00
Alex Henrie c9109309c8 ntdll: Add RtlGrowFunctionTable stub.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-03 22:27:05 +01:00
Austin English 80991720de ntdll: Add RtlAddGrowableFunctionTable stub.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=42255
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-03 22:27:05 +01:00
Andrey Gusev 7ec37be381 ntdll/tests: Fix a typo in comment.
Signed-off-by: Andrey Gusev <andrey.goosev@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-29 15:55:05 +01:00
Brendan McGrath 8cd569cf26 ntdll: Use 32bit when COM header marks it required.
Currently, when using wine64 to to load a .NET application which has the
32-bit required flag switched on, it fails with a c0000017 error
(ERROR_NOT_ENOUGH_MEMORY).

Signed-off-by: Brendan McGrath <brendan@redmandi.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-28 11:38:22 +01:00
Zebediah Figura e6f00d6943 ntdll: Avoid inline assembly in have_cpuid().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-27 19:32:15 +01:00
Zebediah Figura b459572910 ntdll: Avoid inline assembly in do_cpuid().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-27 19:32:15 +01:00
Alexandre Julliard 013c51aca0 makefiles: Create 64-bit wine loader symlinks in the WoW64 build tree.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-26 14:21:29 +01:00
Jacek Caban 29be737652 server: Properly handle disconnected pipe in set_named_pipe_info request.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-23 20:17:45 +01:00
Greg Smith f4b07ee8ec kernel32: Ignore FileIoPriorityHintInfo in SetFileInformationByHandle().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46130
Signed-off-by: Greg Smith <codedonewell@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-20 16:26:04 +01:00
Zebediah Figura 9badb7807f ntdll/tests: Add more tests for NtRemoveIoCompletionEx().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-19 10:17:48 +01:00
Zebediah Figura e09248d363 ntdll: Don't write more IOCP entries than requested.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45948
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-19 10:17:48 +01:00
Zebediah Figura fbde01335f ntdll: Only wait on the completion port if no entries were returned.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-19 10:17:48 +01:00
André Hentschel b78a5db2dc ntdll: Add more traces to raise_exception on ARM64.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46126
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-16 14:58:41 +01:00
André Hentschel ebc80ad1c4 ntdll: Add stubs for RtlAddFunctionTable and RtlDeleteFunctionTable on ARM64.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46143
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-15 09:57:28 +01:00
André Hentschel 95fa795fa1 ntdll: Call system hook in LdrResolveDelayLoadedAPI when dll hook is missing.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46089
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-12 10:30:07 +01:00
Andrey Gusev 0296edbee8 ntdll: Add WinSqmIncrementDWORD stub.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45828
Signed-off-by: Andrey Gusev <andrey.goosev@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-05 19:12:12 +01:00
Jacek Caban 2172855fba ntdll: Update debug trace.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-01 21:50:57 +01:00
Jacek Caban 9ee34a5d92 ntdll: Remove no longer needed event handle from async_irp.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-01 21:50:57 +01:00
Jacek Caban 3dacf82173 server: Add FILE_SKIP_SET_EVENT_ON_HANDLE support.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-01 21:50:57 +01:00
Stefan Dösinger 759e6f1d8d ntdll: Avoid more race conditions in RtlDeregisterWaitEx.
af35aada9b left some issues unfixed.
Instead of running the callback and returning a retval that indicates
the callback is not running, we sometimes wait for it when we are not
supposed to.

Signed-off-by: Stefan Dösinger <stefan@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-31 19:13:15 +01:00
Jacek Caban 43cdcc0794 server: Use file mode flags in async_handoff to decide if request is blocking.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-31 17:15:00 +01:00
Jacek Caban 36693cfb5f ntdll/tests: Add more I/O blocking and completion tests.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-31 17:14:53 +01:00
Jacek Caban 3d5a256797 ntdll: Use correct size when checking iosb in NtFlushBuffersFile (Coverity).
Spotted by Nikolay.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-30 19:00:35 +01:00
Jacek Caban 9050b58f07 ntdll: Correctly return result of blocking NtFlushBuffersFile.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-30 19:00:35 +01:00
Alistair Leslie-Hughes 84a317c738 ntdll: Support TokenVirtualizationEnabled in NtQueryInformationToken.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-30 10:51:31 +01:00
Jacek Caban 2600ecd4ed server: Use a separated object for each opened named pipe device file.
Allows using proper options for ioctl pseudo fd.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-30 00:10:14 +01:00
Jacek Caban f003ac5e62 server: Use requested options for device pseudo fd.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-29 17:02:41 +01:00
Jacek Caban 2adfa93a7f server: Add FileModeInformation implementation.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45749
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-29 17:02:14 +01:00
Alexandre Julliard 72662305b3 ntdll: Partially implement RtlRandomEx().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-26 13:07:15 +02:00
Alexandre Julliard a0050be13f ntdll: Use the default keyed event when the handle is null.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-26 12:45:45 +02:00
Daniel Lehman 25acfbb40b ntdll: Implement RtlWaitOnAddress functions.
Signed-off-by: Daniel Lehman <dlehman25@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-26 11:16:54 +02:00
Sebastian Lackner 18e074b0f3 server: Support FILE_SKIP_COMPLETION_PORT_ON_SUCCESS on client-side asyncs.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=38960
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-25 20:32:03 +02:00
Sebastian Lackner c0996553a1 server: Support FILE_SKIP_COMPLETION_PORT_ON_SUCCESS on server-side asyncs.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=38960
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-25 20:32:03 +02:00
Jacek Caban 4be482bc82 ntdll/tests: Added more FILE_SKIP_COMPLETION_PORT_ON_SUCCESS tests.
Based on a patch by Sebastian Lackner.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-25 20:32:03 +02:00
Sebastian Lackner 2f17e0112d ntdll: Add setting FileIoCompletionNotificationInformation implementation.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=38960
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-25 20:32:03 +02:00
Alexandre Julliard 926dd78069 ntdll: Convert PE header to 64-bit when loading a 32-bit IL-only module.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-25 20:32:03 +02:00
Nikolay Sivov dd7230d1bc ntdll/tests: Add a test for qsort() stability.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-24 17:00:06 +02:00
Alexandre Julliard c998667bf0 ntdll: Also return the SECTION_IMAGE_INFORMATION data from RtlCreateUserProcess().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-24 16:58:08 +02:00
Alexandre Julliard 5cc8bcf0b0 ntdll: Implement RtlCreateUserProcess().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-24 16:58:08 +02:00
Jacek Caban 66e20ce576 server: Add NtQueryInformationFile(FileIoCompletionNotificationInformation) implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-24 16:58:08 +02:00
Jacek Caban 6c2ac81084 ntdll/tests: Add more NtQueryInformationFile tests.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-24 16:58:08 +02:00
Jacek Caban 8b8eba7e6c server: Use default_fd_get_file_info for FileAccessInformation implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-24 16:58:08 +02:00
Jacek Caban 04094a6669 server: Use server_get_file_info for all info classes not implemented on client side.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-24 16:58:08 +02:00
Jacek Caban 6bcd695c78 ntdll: Set IO_STATUS_BLOCK on non-blocking NtFlushBuffersFile success.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-22 09:54:32 +02:00
Jacek Caban dd1769a16a server: Improve error handling of disconnected named pipe clients.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-22 09:53:43 +02:00
Jacek Caban ee28e0107c server: Return STATUS_BUFFER_OVERFLOW in pipe_end_peek for partial reads in message mode.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-22 09:53:25 +02:00
Jacek Caban 68a32b8c8e server: Support NamedPipeState in FilePipeLocalInformation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-17 10:01:11 +02:00
Jacek Caban 5f43a1b93e server: Use pipe_end_get_file_info for FilePipeInformation implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-17 10:01:10 +02:00
Jacek Caban 36c6a16c62 server: Use pipe_end_get_file_info for FilePipeLocalInformation implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-17 10:01:10 +02:00
Alexandre Julliard 76cbf12894 ntdll/tests: Add tests for RtlCreateProcessParameters().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-16 20:46:29 +02:00
Alexandre Julliard b5d4484cd2 ntdll: Allocate process parameters on the heap in RtlCreateProcessParametersEx().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-16 20:46:27 +02:00
Alexandre Julliard 179c0ee6fb ntdll: Align string data in RtlCreateProcessParametersEx().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-16 20:45:55 +02:00
Alexandre Julliard ae7ccbba48 ntdll: Fixup size of the current directory in RtlCreateProcessParametersEx().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-16 20:45:55 +02:00
Alexandre Julliard fce198cc5e ntdll: Store a copy of the environment in RtlCreateProcessParametersEx().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-16 15:15:59 +02:00
Jacek Caban a0669eeead ntdll/tests: Use FILE_INFORMATION_CLASS values instead of hardcoded numbers.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-13 00:31:07 +02:00
Alexandre Julliard 03e05c1f57 ntdll: Implement RtlSetUnhandledExceptionFilter().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-09 14:49:54 +02:00
Alexandre Julliard da60ea1c33 ntdll: Add a wrapper to call the unhandled exception filter.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-09 14:42:30 +02:00
Alexandre Julliard 2418bb1dab ntdll: Implement RtlCreateProcessParametersEx().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-08 20:26:34 +02:00
Dmitry Timoshkov 2742ce91f5 ntdll/tests: Add more tests for setting delete disposition on a non-empty directory.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-02 09:01:50 -07:00
Zebediah Figura ef2471ec0f ntdll: Implement NtRemoveIoCompletionEx().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-01 19:12:20 -07:00
Zebediah Figura 248d0ee315 ntdll/tests: Add some tests for NtRemoveIoCompletionEx().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-01 19:12:19 -07:00
Zebediah Figura 5d691648d3 ntdll/tests: Get rid of test_iocompletion().
Call I/O completion tests directly.

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-01 19:12:19 -07:00
Zebediah Figura a074281d1b ntdll/tests: Remove some unnecessary workarounds.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-01 19:12:18 -07:00
Zebediah Figura 9ca8280b28 ntdll/tests: Remove a superfluous helper.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-01 19:12:18 -07:00
Zebediah Figura 332c67535b ntdll/tests: Use a temporary path in open_file_test().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-01 19:12:17 -07:00
Dmitry Timoshkov a4d5a919de ntdll/tests: Add more file disposition tests.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-28 17:28:57 +02:00
Dmitry Timoshkov feb73b2af9 ntdll/tests: Clarify some file disposition test results, remove useless tests.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-28 17:28:55 +02:00
Dmitry Timoshkov 4fd82271eb ntdll/tests: Fix compilation with PSDK.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-28 17:28:53 +02:00
Alexandre Julliard 2cab0ec389 server: Don't return the process exe file to the client.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-24 22:41:30 +02:00
Alexandre Julliard 0fd450af5b server: Specify the process in which to create a new thread.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-20 14:50:48 +02:00
Alexandre Julliard 4a328e08ac server: Allow specifying the security descriptor for a new thread.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-20 13:06:12 +02:00
Alexandre Julliard be40b01c37 server: Align object attributes to a DWORD-boundary.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-20 12:59:32 +02:00
Alex Henrie bca3ec9fd9 ntdll: Add DECLSPEC_HOTPATCH to functions patched by libtcmalloc.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45199
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-18 20:59:38 +02:00
Andrew Wesie 86878fe00b ntdll: Stub for ProcessCookie in NtQueryInformationProcess.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-17 18:28:18 +02:00
Roger Zoellner 575c1c9066 ntdll: Relax checks for valid affinity mask in NtSetInformationThread().
Signed-off-by: Roger Zoellner <zoellner.roger@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-14 14:12:06 +02:00
Michael Müller 3b0d064283 ntdll: Add stub for ApiSetQueryApiSetPresence.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-14 14:07:42 +02:00
Alex Henrie e3fe1b0946 ntdll/tests: Handle case where process doesn't have its own DEP policy.
If neither MEM_EXECUTE_OPTION_ENABLE nor MEM_EXECUTE_OPTION_DISABLE is
set in the ProcessExecuteFlags, the process is using the system DEP
setting.

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-14 12:48:14 +02:00
André Hentschel 6a3d2cb2f3 ntdll: Bump Win 10 version to 17134.
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-07 13:03:31 +02:00
Josh DuBois 7f567451b2 ntdll: Use root of c: drive as fallback cwd during startup.
Signed-off-by: Josh DuBois <duboisj@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-06 22:12:17 +02:00
Jacek Caban 8c9c2fca08 server: Support ObjectTypeInformation in pipe objects.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45743
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-03 15:53:18 +02:00