Commit Graph

3900 Commits

Author SHA1 Message Date
Alexandre Julliard 26c59d845e ntdll: Ignore attempts to commit pages in an already committed anonymous mapping.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-08 16:23:15 +02:00
Alexandre Julliard 5073beaefe ntdll: Store the SEC_* section flags directly in the view protection.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-08 16:23:15 +02:00
Alexandre Julliard b2624ab99a ntdll: Remove the no longer used VPROT_NOEXEC flag.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-08 16:23:15 +02:00
Alexandre Julliard 08acac0864 ntdll: Disallow changing PAGE_NOCACHE flag for individual pages.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-08 16:23:15 +02:00
Alexandre Julliard 2967e3efb6 ntdll: Store memory views in a binary tree instead of a list.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-07 19:32:29 +02:00
Alexandre Julliard 917d98a457 ntdll: Use the find_view_range helper function to check for overlapping views.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-07 19:07:32 +02:00
Stefan Dösinger af35aada9b ntdll: Make RtlDeregisterWaitEx(handle, INVALID_HANDLE_VALUE) thread safe.
Chromium signals the wait semaphore and calls DeregisterWaitEx with
CompletionHandle = INVALID_HANDLE_VALUE in close succession. Sometimes
the worker thread decides to run the callback, but before it sets
CallbackInProgress RtlDeregisterWaitEx decides that the callback is not
running and returns STATUS_SUCCESS. Chromium then releases resources
that the callback needs to run, resulting in random crashes.

Signed-off-by: Stefan Dösinger <stefan@codeweavers.com>
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-06 20:32:07 +02:00
Alexandre Julliard 3bfd7973a4 ntdll: Don't do partial writes in virtual_uninterrupted_write_memory.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-06 17:31:00 +02:00
Alexandre Julliard a0f64e1231 ntdll: Allocate views out of a memory block instead of using a heap.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-06 10:01:07 +02:00
Alexandre Julliard 2e12f7cdd6 ntdll: Remove the view parameter from the page protection helpers.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-05 16:53:37 +02:00
Alexandre Julliard 3ecf069e45 ntdll: Allocate the per-page protection byte separately from the view.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-05 16:53:37 +02:00
Alexandre Julliard eb5c187254 ntdll: Pass the allocation size to the alloc_virtual_heap function.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-05 16:22:38 +02:00
Alexandre Julliard 4069c4a4d1 ntdll: Add a helper function for applying page protection bytes with mprotect.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-05 16:22:37 +02:00
Alexandre Julliard e4b5e5da8a ntdll: Add a helper function for setting bits in page protection bytes.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-05 16:21:47 +02:00
Alexandre Julliard 727b94842e ntdll: Add helper functions for getting and setting page protection bytes.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-05 16:21:45 +02:00
Alexandre Julliard b31583770f ntdll: Store the PEB lock pointer in the PEB.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-31 10:08:01 +02:00
Alistair Leslie-Hughes cb13ee3bf1 ntdll: Use standard wine_dbgstr_longlong.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-25 12:47:14 +02:00
Sebastian Lackner dee9eaa248 ntdll: Fix a TRACE in NtGetContextThread.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-12 11:11:55 +09:00
Alistair Leslie-Hughes 3b05f552e2 ntdll/tests: Use standard wine_dbgstr_longlong.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-08 20:13:55 +09:00
Martin Storsjo 4eb2c5532d ntdll: Simplify the arm version of a stub function.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-01 16:28:37 +02:00
Martin Storsjo dd30536044 ntdll: Implement allocate_stub for arm64.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-01 16:28:14 +02:00
Alexandre Julliard abe0b1c57b server: Initialize debug registers in new threads if necessary.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-27 17:04:04 +02:00
Alexandre Julliard f680ccb898 ntdll/tests: Test hardware breakpoints in newly created thread.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-26 22:14:00 +02:00
Michael Müller 26f9c73eb0 ntdll/tests: Test debug register values in newly created thread.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-26 22:13:58 +02:00
Alexandre Julliard ca20bddefc ntdll: Remove support for relay debugging of register functions.
The only remaining ones in krnl386 have been removed.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-26 10:41:27 +02:00
Alexandre Julliard bab6ece637 ntdll: Set thread context directly in assembly instead of using generated code.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-26 10:22:05 +02:00
Alexandre Julliard 38d45cbcc8 ntdll: Mark function that are only called from assembly as hidden.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-25 11:48:24 +02:00
André Hentschel 2e9611bbd0 ntdll: Make sure the stack is quad-word aligned on ARM64.
Signed-off-by: André Hentschel <nerv@dawncrow.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-24 20:05:19 +02:00
Alexandre Julliard dc63fbf98d ntdll: Use RtlCaptureContext also in RtlUnwind.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-24 18:58:30 +02:00
Alexandre Julliard 2bb668b1da ntdll: Get some values from the parent stackframe in RtlCaptureContext.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-24 18:58:30 +02:00
Alexandre Julliard 1c49905182 ntdll: Add an assembly wrapper to return correct values for the current thread in NtGetContextThread.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-24 18:58:29 +02:00
Alexandre Julliard 143143ad00 ntdll: Add small assembly wrappers for snooping instead of saving/restoring the entire context.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-20 16:18:45 +02:00
Alexandre Julliard a75e3f734d ntdll: Call NtRaiseException directly from RtlRaiseException on i386.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-20 13:54:43 +02:00
Alexandre Julliard 1522280e68 ntdll: Remove the raise_exception helper function on x86-64.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-20 13:30:58 +02:00
Alexandre Julliard ac6244b55a ntdll: Call NtRaiseException directly from RtlRaiseException on x86-64.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-20 13:00:10 +02:00
Alexandre Julliard a1b563f41c ntdll: Add support for debug registers in exceptions on x86-64.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-19 19:13:30 +02:00
Alexandre Julliard 9e59362ae3 ntdll: Move the plaform-specific thread data to the SystemReserved2 TEB field.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-19 19:13:30 +02:00
Alexandre Julliard b87c66dd65 ntdll: Move the plaform-independent thread data to the GdiTebBatch TEB field.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-19 19:13:29 +02:00
Alexandre Julliard f1ef8a4d9d ntdll: Add platform-specific versions of the thread data structure.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-19 19:13:29 +02:00
Alexandre Julliard fed30058bb ntdll: Don't copy cached debug registers from the parent thread.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-18 20:43:32 +02:00
Alexandre Julliard ce46de5a94 ntdll: Move NtGetContextThread implementation to the platform-specific files.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-18 20:43:32 +02:00
Alexandre Julliard 675e8218f0 ntdll: Move NtSetContextThread implementation to the platform-specific files.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-18 20:43:32 +02:00
Alexandre Julliard 1e48417567 ntdll: Add helper functions for getting and setting thread context through the server.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-18 20:43:32 +02:00
Alexandre Julliard da6ca91e28 ntdll: Remove unnecessary helper to set debug registers.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-18 20:43:32 +02:00
Akihiro Sagawa 74b7fcfbdb ntdll: Allow map_view() to allocate fixed memory between reserved area and non-reserved area.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-13 13:48:55 +02:00
Jacek Caban 82e6713b75 server: Don't allow APCs on objects associated with completion port.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-10 20:51:11 +02:00
Martin Storsjo 114d8aded7 ntdll: Handle IMAGE_REL_BASED_DIR64 for arm64 in the same way as for x86_64.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-07 19:48:32 +02:00
Francois Gouget e3b1437e1b ntdll/tests: A spelling fix in a comment.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-06 18:49:38 +02:00
Akihiro Sagawa 7c06d99e83 ntdll/tests: Add more tests if we have real VM counters.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-03 19:34:24 +02:00
Alistair Leslie-Hughes a3c1fbae2a ntdll/tests: Use standard wine_dbgstr_longlong.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-03 15:57:45 +02:00