-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
8310906: Fix -Wconversion warnings in runtime, oops and some code header files. #14659
Conversation
👋 Welcome back coleenp! A progress list of the required criteria for merging this PR into |
@@ -217,7 +217,7 @@ template<typename FKind> frame ThawBase::new_stack_frame(const frame& hf, frame& | |||
intptr_t* heap_sp = hf.unextended_sp(); | |||
// If caller is interpreted it already made room for the callee arguments | |||
int overlap = caller.is_interpreted_frame() ? ContinuationHelper::InterpretedFrame::stack_argsize(hf) : 0; | |||
const int fsize = ContinuationHelper::InterpretedFrame::frame_bottom(hf) - hf.unextended_sp() - overlap; | |||
const int fsize = checked_cast<int>(ContinuationHelper::InterpretedFrame::frame_bottom(hf) - hf.unextended_sp() - overlap); |
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.
This line computes the size of the unextended frame minus the overlap that exists if the callee is using arguments in the caller’s frame. So this value is lower or equal to the frame’ size which is encoded with an int. I don't think a checked_cast is required here. This applies to the x86 version too.
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.
I'll make this change in the new PR. I'm going to redo the address calculations to call a function rather than the casts.
After some offline conversation with Ioi, we thought of a better way to express these pointer subtractions returning int, so I'm going to close this PR and open a new one with at least these changed with that new function.
|
More casts for size of address differences in same code space, checked_casts<> and type changes to fix -Wconversion warnings. See CR for details.
Tested with tier1-4.
Progress
Issue
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/14659/head:pull/14659
$ git checkout pull/14659
Update a local copy of the PR:
$ git checkout pull/14659
$ git pull https://git.openjdk.org/jdk.git pull/14659/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 14659
View PR using the GUI difftool:
$ git pr show -t 14659
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/14659.diff
Webrev
Link to Webrev Comment