Skip to content

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

Closed
wants to merge 2 commits into from

Conversation

offamitkumar
Copy link
Member

@offamitkumar offamitkumar commented Sep 4, 2024

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

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed (2 reviews required, with at least 1 Reviewer, 1 Author)

Warning

 ⚠️ Found leading lowercase letter in issue title for 8332461: ubsan : dependencies.cpp:906:3: runtime error: load of value 4294967295, which is not a valid value for type 'DepType'

Issue

  • JDK-8332461: ubsan : dependencies.cpp:906:3: runtime error: load of value 4294967295, which is not a valid value for type 'DepType' (Bug - P4)

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

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 4, 2024

👋 Welcome back amitkumar! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Sep 4, 2024

@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:

8332461: ubsan : dependencies.cpp:906:3: runtime error: load of value 4294967295, which is not a valid value for type 'DepType'

Reviewed-by: stefank, kvn, dlong

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 master branch:

  • 96df5a6: 8339316: Test runtime/exceptionMsgs/NoClassDefFoundError/NoClassDefFoundErrorTest.java fails after JDK-8338257
  • 55312e1: 8338937: Optimize the string concatenation of ClassDesc
  • d4dfa01: 8338530: CDS warning Skipping java/lang/invoke/BoundMethodHandle$Species_LLLL
  • b8d560b: 8339233: Test javax/swing/JButton/SwingButtonResizeTestWithOpenGL.java#id failed: Button renderings are different after window resize
  • 1353601: 8338924: C1: assert(0 <= i && i < _len) failed: illegal index 5 for length 5
  • 433f6d8: 8339492: StackMapDecoder::writeFrames makes lots of allocations
  • ef96a7b: 8332901: Select{Current,New}ItemTest.java for Choice don't open popup on macOS
  • 12d060a: 8339148: Make os::Linux::active_processor_count() public
  • 0cfd08f: 8339112: Move JVM Klass flags out of AccessFlags
  • 6f8714e: 8336860: x86: Change integer src operand for CMoveL of 0 and 1 to long
  • ... and 7 more: https://git.openjdk.org/jdk/compare/9a1024dec68057c7c581ac0a38fc7f96489a0a76...master

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 master branch, type /integrate in a new comment.

@openjdk openjdk bot changed the title 8332461 8332461: ubsan : dependencies.cpp:906:3: runtime error: load of value 4294967295, which is not a valid value for type 'DepType' Sep 4, 2024
@openjdk openjdk bot added the rfr Pull request is ready for review label Sep 4, 2024
@openjdk
Copy link

openjdk bot commented Sep 4, 2024

@offamitkumar The following label will be automatically applied to this pull request:

  • hotspot-compiler

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.

@openjdk openjdk bot added the hotspot-compiler hotspot-compiler-dev@openjdk.org label Sep 4, 2024
@mlbridge
Copy link

mlbridge bot commented Sep 4, 2024

Webrevs

Copy link
Member

@stefank stefank left a 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)

@offamitkumar
Copy link
Member Author

Shouldn't this new enum value also be used in the place that sets DepType to -1?:

Done, Thanks for the suggestion & Please have a look again.

Copy link
Member

@stefank stefank left a 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.

@stefank
Copy link
Member

stefank commented Sep 4, 2024

/reviewers 2

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Sep 4, 2024
@openjdk
Copy link

openjdk bot commented Sep 4, 2024

@stefank
The total number of required reviews for this PR (including the jcheck configuration and the last /reviewers command) is now set to 2 (with at least 1 Reviewer, 1 Author).

@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Sep 4, 2024
Copy link
Contributor

@vnkozlov vnkozlov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Sep 4, 2024
@@ -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,
Copy link
Member

@dean-long dean-long Sep 5, 2024

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.

Copy link
Member

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.

@offamitkumar
Copy link
Member Author

I tested the builds and fastdebug & release builds are fine, so let's integrate. Thanks @stefank @vnkozlov @dean-long for the suggestion & approval :-)

/integrate

@openjdk
Copy link

openjdk bot commented Sep 5, 2024

Going to push as commit 28de44d.
Since your change was applied there have been 17 commits pushed to the master branch:

  • 96df5a6: 8339316: Test runtime/exceptionMsgs/NoClassDefFoundError/NoClassDefFoundErrorTest.java fails after JDK-8338257
  • 55312e1: 8338937: Optimize the string concatenation of ClassDesc
  • d4dfa01: 8338530: CDS warning Skipping java/lang/invoke/BoundMethodHandle$Species_LLLL
  • b8d560b: 8339233: Test javax/swing/JButton/SwingButtonResizeTestWithOpenGL.java#id failed: Button renderings are different after window resize
  • 1353601: 8338924: C1: assert(0 <= i && i < _len) failed: illegal index 5 for length 5
  • 433f6d8: 8339492: StackMapDecoder::writeFrames makes lots of allocations
  • ef96a7b: 8332901: Select{Current,New}ItemTest.java for Choice don't open popup on macOS
  • 12d060a: 8339148: Make os::Linux::active_processor_count() public
  • 0cfd08f: 8339112: Move JVM Klass flags out of AccessFlags
  • 6f8714e: 8336860: x86: Change integer src operand for CMoveL of 0 and 1 to long
  • ... and 7 more: https://git.openjdk.org/jdk/compare/9a1024dec68057c7c581ac0a38fc7f96489a0a76...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Sep 5, 2024
@openjdk openjdk bot closed this Sep 5, 2024
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Sep 5, 2024
@openjdk
Copy link

openjdk bot commented Sep 5, 2024

@offamitkumar Pushed as commit 28de44d.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@offamitkumar offamitkumar deleted the ubsan_v0 branch November 24, 2024 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-compiler hotspot-compiler-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

4 participants