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
8264908: Investigate adding BOT range check in G1BlockOffsetTablePart::block_at_or_preceding #4775
Conversation
|
Webrevs
|
Re |
Thanks, will do that. |
96ff795
to
1d71c8c
Compare
// "addr" is past the end, start at the last valid index. | ||
index = MIN2(index, _next_offset_index - 1); | ||
// We must make sure that the offset table entry we use is valid. | ||
assert(index < _next_offset_index, "Precondition"); |
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 feel a bit uneasy that the caller (block_start
) allows more than the callee (values < _hr->end()
), but this is probably the change that is supposed to be coming?
Looks good, but I would have preferred the original change or the upcoming change with some asserts included.
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 can add the deferred change, instead of splitting it off into a separate PR.
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 caller (block_start) allows more than the callee (values < _hr->end())
That path should never be taken, so I am not worried about. I suggested putting that in another PR since those assertions are not obvious from the current ticket title. Anyway, this is subjective.
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.
@albertnetymk : I know. Still it seems something is missing to me, but that's subjective. Let's just defer it.
// "addr" is past the end, start at the last valid index. | ||
index = MIN2(index, _next_offset_index - 1); | ||
// We must make sure that the offset table entry we use is valid. | ||
assert(index < _next_offset_index, "Precondition"); |
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.
@albertnetymk : I know. Still it seems something is missing to me, but that's subjective. Let's just defer it.
@walulyai This change now passes all automated pre-integration checks. 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 1 new commit pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the
|
Thanks @albertnetymk and @tschatzl for the reviews! /integrate |
Going to push as commit 99d7f9a.
Your commit was automatically rebased without conflicts. |
Hi all,
Please review this cleanup change to add an assert to G1BlockOffsetTablePart::block_at_or_preceding. Additionally, remove code that attempts to read beyond the _next_offset_index threshold.
Testing: Tier 1-3
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/4775/head:pull/4775
$ git checkout pull/4775
Update a local copy of the PR:
$ git checkout pull/4775
$ git pull https://git.openjdk.java.net/jdk pull/4775/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 4775
View PR using the GUI difftool:
$ git pr show -t 4775
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/4775.diff