New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8289275: Remove incorrect __declspec(dllimport) attributes from pointers in jdk.crypto.cryptoki #9353
Conversation
👋 Welcome back jwaters! A progress list of the required criteria for merging this PR into |
@TheShermanTanker The following label will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command. |
Webrevs
|
pkcs11.h is a standard header file from OASIS. Best to leave it alone. Just my .02. |
The only change to pkcs11.h is in a comment though, the other changes are outside the ANSI C headers from the standard. Should I just revert the comment in that case? |
Tested with Without __declspec(dllimport):
With __declspec(dllimport):
|
Sounds good to me. |
Alright, will do. I also do want to look at p11_md.h to see if my changes are appropriate in the meantime, as I have a feeling it can be accomplished somewhat more elegantly Thanks for the review! |
@TheShermanTanker This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 82 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@valeriepeng) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
/integrate |
@TheShermanTanker |
@valeriepeng Might need you to sponsor this, thanks for the review! |
/sponsor |
Going to push as commit 0dda3c1.
Your commit was automatically rebased without conflicts. |
@valeriepeng @TheShermanTanker Pushed as commit 0dda3c1. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Several instances of function pointers in jdk.crypto.cryptoki are marked with the dllimport attribute, which should only be applied to symbol declarations, of which a typedef'd function pointer is not. This would only be useful if a function pointer defined in the linked dll is desired to be imported, not if the pointer itself is created locally and used to store a function address. In addition to being incorrect, at least on the versions of Visual C++ the JDK supports today, it is also redundant; Typically they are used to avoid an indirect stub that jumps to the proper entry in the import address table, but usage of these typedefs involves loading the address of a function and directly (Usually through GetProcAddress, even in other cases it would simply be set to the address of a function anyway) assigning it to the pointer before immediately dispatching when called, which bypasses this procedure entirely and makes the attribute pointless.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/9353/head:pull/9353
$ git checkout pull/9353
Update a local copy of the PR:
$ git checkout pull/9353
$ git pull https://git.openjdk.org/jdk pull/9353/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 9353
View PR using the GUI difftool:
$ git pr show -t 9353
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/9353.diff