8311301: MethodExitTest may fail with stack buffer overrun#14770
8311301: MethodExitTest may fail with stack buffer overrun#14770djelinski wants to merge 2 commits intoopenjdk:masterfrom
Conversation
|
👋 Welcome back djelinski! A progress list of the required criteria for merging this PR into |
|
@djelinski 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
|
kevinjwalls
left a comment
There was a problem hiding this comment.
Looks good to me. 8-)
dholmes-ora
left a comment
There was a problem hiding this comment.
Why not type them void* as expected by the API, and then you can also drop the casts?
Thanks.
|
The diff to intptr_t was an order of magnitude smaller. But I agree, the code looks better without the casts. |
|
@djelinski 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 26 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. ➡️ To integrate this PR with the above commit message to the |
sspitsyn
left a comment
There was a problem hiding this comment.
Looks good.
Thanks,
Serguei
dholmes-ora
left a comment
There was a problem hiding this comment.
Looks good albeit more extensive than I had envisaged.
Thanks.
| static const void* const tls_data1 = (const void*)0x111; | ||
| static const void* const tls_data2 = (const void*)0x222; |
There was a problem hiding this comment.
Was this necessitated by the change to void*? If so I had not expected that.
There was a problem hiding this comment.
I guess I could have changed the logging code to use "%d", (int)(intptr_t)tls_data and call it a day, but it would be ugly.
|
Thanks for the reviews! /integrate |
|
Going to push as commit 3d813ae.
Your commit was automatically rebased without conflicts. |
|
@djelinski Pushed as commit 3d813ae. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Please review this test-only fix that fixes the size of variables that are used in methods that expect a pointer.
On Windows, type
longis 32 bits, pointers are 64 bits large. The methodGetThreadLocalStoragewrites a pointer (64 bits) to the address given by its parameter, which overflows along. The code generated by VS compiler ignores this, but the code generated by clang crashes the test.No new tests. MethodExitTest continues to pass on supported platforms, and passes on clang+win with this fix.
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/14770/head:pull/14770$ git checkout pull/14770Update a local copy of the PR:
$ git checkout pull/14770$ git pull https://git.openjdk.org/jdk.git pull/14770/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 14770View PR using the GUI difftool:
$ git pr show -t 14770Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/14770.diff
Webrev
Link to Webrev Comment