-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
8297417: Poly1305IntrinsicFuzzTest fails with tag mismatch exception #11308
Conversation
👋 Welcome back vpaprotsk! A progress list of the required criteria for merging this PR into |
@vpaprotsk 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
|
@@ -559,7 +559,7 @@ void StubGenerator::poly1305_process_blocks_avx512( | |||
const Register t0 = r13; | |||
const Register t1 = r14; | |||
const Register t2 = r15; | |||
const Register rscratch = r13; | |||
const Register rscratch = r14; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The register map above in the comments also should reflect this change that rscratch is r14 now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done. (or rather, ended up removing rscratch
completely from that function)
It's a general problem: it's hard to see possible interference when names alias to the same register. I suggest to get rid of
|
Also, |
Thanks, was wondering about that.
Hmm. I think register aliasing is pretty much a 'necessary evil' in the intrinsic code. Having better names for variables combined with too few registers leads to this issue. (unless of course we could somehow inject intrinsics before register_ allocation. Writing assembler with infinite registers.. there is an idea :) ) . But in this specific case maybe getting rid of aliasing doesn't harm the readability that much. In some way, I would had preferred to keep |
@iwanowww done
|
PR looks good to me. |
@vpaprotsk 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 28 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 (@sviswa7, @iwanowww, @robcasloz, @TobiHartmann) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
@@ -49,14 +49,14 @@ | |||
* @key randomness | |||
* @modules java.base/com.sun.crypto.provider | |||
* @summary Unit test for IntrinsicCandidate in com.sun.crypto.provider.Poly1305. | |||
* @run main/othervm -Xcomp -XX:-TieredCompilation java.base/com.sun.crypto.provider.Poly1305IntrinsicFuzzTest | |||
* @run main/othervm -Xcomp -XX:-TieredCompilation -XX:+ForceUnreachable java.base/com.sun.crypto.provider.Poly1305IntrinsicFuzzTest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't you need -XX:+UnlockDiagnosticVMOptions
here as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Darn. Yes.. one min, will push.. Sorry about the noise. (thought that the fact that it failed on linux meant it wasnt a diagnostic, but it is..)
product(bool, ForceUnreachable, false, DIAGNOSTIC, \
"Make all non code cache addresses to be unreachable by " \
"forcing use of 64bit literal fixups")
@@ -559,7 +558,6 @@ void StubGenerator::poly1305_process_blocks_avx512( | |||
const Register t0 = r13; | |||
const Register t1 = r14; | |||
const Register t2 = r15; | |||
const Register rscratch = r13; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After seeing the whole patch, I noticed that t1
is used only at the very end of the stub.
Alternatively, you could keep rscratch
and move t1
declaration close to the use sites.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No (unless I misunderstood), there are a couple more in the middle passed to poly1305_multiply_scalar
(I prefer 'the look' of t0, t1, t2
)
poly1305_multiply_scalar(a0, a1, a2,
r0, r1, c1, true,
t0, t1, t2, mulql, mulqh);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you are right. Overlooked those when browsed code on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
Submitted the patch for testing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for promptly addressing this issue, Volodymyr, looks good. I see that @iwanowww's internal testing succeeded.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me too.
/integrate |
@vpaprotsk |
This is causing some noise in our CI. While I'm not that familiar with the /sponsor |
Going to push as commit 74d3bac.
Your commit was automatically rebased without conflicts. |
@kimbarrett @vpaprotsk Pushed as commit 74d3bac. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
From #10582,
t0
gets clobbered ifrscratch
is used. Example, here:Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/11308/head:pull/11308
$ git checkout pull/11308
Update a local copy of the PR:
$ git checkout pull/11308
$ git pull https://git.openjdk.org/jdk pull/11308/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 11308
View PR using the GUI difftool:
$ git pr show -t 11308
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/11308.diff