-
Notifications
You must be signed in to change notification settings - Fork 571
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
i#1309 win8+ threads: use NtCreateThreadEx for internal nudges (#2838)
Since NtCreateThread returns STATUS_ACCESS_DENIED on win8+, we implement a solution for internal nudges using NtCreateThreadEx. We already have support for varying who frees the stack in NUDGE_NUDGER_FREE_STACK, which we leverage here. The other complication is who frees the arg_buf for a remote process (since we can't easily put it on the stack): again, we already have NUDGE_FREE_ARG which we use here. We also fix a bug in cleanup_and_terminate that results in a double-free of a nudge dstack: a simple 1-byte-bool error where our asm checks all 4 bytes. A similar asm bug found by inspection with sig_should_swap_stack() is also fixed. This fixes internal nudges. Client threads and external nudges will be fixed separately. Issue: #1309, #1432, #2835
- Loading branch information
1 parent
cd3e7c1
commit b565a05
Showing
5 changed files
with
126 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters