Windows: fix and re-enable 2 tests - #52
Open
slipher wants to merge 4 commits into
Open
Conversation
It needed a Python 3 migration to signed process exit code.
For some reason functions in the printf family were crashing when called from the crash handler in run_patch_ntdll_test. Avoid this by switching them to (f)puts instead of (f)printf, and re-enable the test. Also modify the handler to do an infinite loop (thus timing out the test) if unexpected extra crashes happen.
Use int 0x29 aka __fastfail (introduced in Windows 8) to implement NaCl_exception_dispatcher_exit_fast.
Fixes run_patch_ntdll_test on MinGW. MinGW GCC 16 decided to be clever and optimize out `*(int*)0 = 0`. It does this even if I add `volatile`. So change the target address to 4 instead of 0 so the special null pointer optimization can't be applied. Also do this for the other 14 places where a hard-coded null pointer is dereferenced.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix and enable
run_patch_ntdll_testandrun_debug_stub_test. Also update the crash handler to use the new__fastfailmethod of instantly exiting the process introduced in Windows 8.