Fix unittests for windows 32bit intel#1278
Merged
matthiasblaesing merged 4 commits intojava-native-access:masterfrom Dec 3, 2020
Merged
Fix unittests for windows 32bit intel#1278matthiasblaesing merged 4 commits intojava-native-access:masterfrom
matthiasblaesing merged 4 commits intojava-native-access:masterfrom
Conversation
Member
Author
|
@dbwiddis could you please have a look? |
dbwiddis
reviewed
Dec 1, 2020
Contributor
dbwiddis
left a comment
There was a problem hiding this comment.
Left some comments on the first branch. The second two look sane to me but I'm not experienced enough with inline assembly or callbacks to conduct a more substantive review.
3cbe93a to
7da6577
Compare
Member
Author
|
Thank you for the review Daniel. I admit, that I did not want to do that many changes, but you are right, using the intended function is the sane approach. It might also help to fix #1269. Could you have another look, I had some WTF moments looking at the various path options windows offers. I'll take care of the merge conflict once this is merge ready. |
Contributor
|
Looks good to me! |
dbwiddis
approved these changes
Dec 3, 2020
7da6577 to
6a6be08
Compare
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.
With the improvements done by @tresf in #1264 three failing windows unittests on x86 were identified:
GetModuleFileNameExWcan fail on 64bit platforms, if the calling programm is 32bit. I did not find official documentation about this, but the indication I found on the net speculate, that the problem is observed, when the target process is mapped beyon the memory range, that a 32 bit process can observe.GetProcessImageFileNamecan be used as an alternative, but returns a different format (device path) and needs to be converted, to return the expected value.testCreateRemoteThreadcreates a thread by writing the binary directly into memory and starting the thread with the memory location. That binary was only valid for 64bit, but nor for 32 bit (different calling convention). The binary for x86 was retrieved by combining observations of binaries and assembler output from mingw and reading the opcode documentation for x86.testWindowMesssagesfailed becauseSetWindowLongPtronly exists on x86-64, on x86 it is only present as a header based alias forSetWindowLong