-
Notifications
You must be signed in to change notification settings - Fork 5.9k
8332461: ubsan : dependencies.cpp:906:3: runtime error: load of value 4294967295, which is not a valid value for type 'DepType' #20847
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
Conversation
👋 Welcome back amitkumar! A progress list of the required criteria for merging this PR into |
@offamitkumar 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 17 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 |
@offamitkumar 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
|
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.
Shouldn't this new enum value also be used in the place that sets DepType to -1?:
_type = (DepType)(end_marker-1); // defeat "already at end" assert
(An alternative could be to find another way to defeat the "already at end" assert, but I guess that's out-of-scope for this PR)
Done, Thanks for the suggestion & Please have a look again. |
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 from my POV, but I'd like to see one of the compiler devs to properly Review this.
/reviewers 2 |
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.
Good.
@@ -103,6 +103,9 @@ class Dependencies: public ResourceObj { | |||
// type now includes N, that is, all super types of N. | |||
// | |||
enum DepType { | |||
// _type is initially set to -1, to prevent "already at end" assert | |||
undefined_dependency = -1, |
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.
Preserving the existing value seems fine, though it appears any value >= TYPE_LIMIT would work just 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.
FWIW, I was also entertaining the idea of a solution like that with the hope that it would fit better with the usage in the iterators.
I tested the builds and fastdebug & release builds are fine, so let's integrate. Thanks @stefank @vnkozlov @dean-long for the suggestion & approval :-) /integrate |
Going to push as commit 28de44d.
Your commit was automatically rebased without conflicts. |
@offamitkumar Pushed as commit 28de44d. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
The error mentioned in the JBS issue is seen on x86_64 as well as on s390x during the build, with
--enable-ubsan
configuration.I have added
-1
to enum to fix this issue for now as mentioned by @MBaesken. But removing the assert itself is also a possible solution, mentioned on the JBS issue.So I will happy to follow the reviews/suggestion if this is not a good fix.
Progress
Warning
8332461: ubsan : dependencies.cpp:906:3: runtime error: load of value 4294967295, which is not a valid value for type 'DepType'
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/20847/head:pull/20847
$ git checkout pull/20847
Update a local copy of the PR:
$ git checkout pull/20847
$ git pull https://git.openjdk.org/jdk.git pull/20847/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 20847
View PR using the GUI difftool:
$ git pr show -t 20847
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/20847.diff
Webrev
Link to Webrev Comment