Skip to content
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

8331167: UBSan enabled build fails in adlc on macOS #18976

Closed
wants to merge 1 commit into from

Conversation

MBaesken
Copy link
Member

@MBaesken MBaesken commented Apr 26, 2024

When configuring with '--enable-ubsan' (https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html) and doing a macOS x86_64 fastdebug build, I run into this build error after very short time :
jdk/src/hotspot/share/adlc/adlparse.cpp:5228:36: runtime error: applying non-zero offset 1 to null pointer
#0 0x103fa4b4b in ADLParser::skipws_common(bool) adlparse.cpp:5228
#1 0x103f76aed in ADLParser::skipws() adlparse.hpp:271
#2 0x103f763c6 in ADLParser::parse() adlparse.cpp:95
#3 0x10407054d in main main.cpp:178
#4 0x7fff2044ef3c in start+0x0 (libdyld.dylib:x86_64+0x15f3c)

So it seems that UBSan support is currently not working well on macOS because the build fails early. Seems we add 1 to a nullptr in the adlc code in some cases and UBSAN complains about it.


Progress

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

Issue

  • JDK-8331167: UBSan enabled build fails in adlc on macOS (Bug - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/18976/head:pull/18976
$ git checkout pull/18976

Update a local copy of the PR:
$ git checkout pull/18976
$ git pull https://git.openjdk.org/jdk.git pull/18976/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 18976

View PR using the GUI difftool:
$ git pr show -t 18976

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/18976.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Apr 26, 2024

👋 Welcome back mbaesken! 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 Apr 26, 2024

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

8331167: UBSan enabled build fails in adlc on macOS

Reviewed-by: stuefe, lucy

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 5 new commits pushed to the master branch:

  • 0bf516f: 8330624: Inconsistent use of semicolon in the code snippet of java.io.Serializable javadoc
  • d13e533: 8321014: RISC-V: C2 VectorLoadShuffle
  • 8bbd725: 8331187: Optimize MethodTypeDesc and ClassDesc.ofDescriptor for primitive types
  • 5e2ced4: 8327247: C2 uses up to 2GB of RAM to compile complex string concat in extreme cases
  • 2b7176a: 8330625: Compilation memory statistic: prevent tearing of the final report

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
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 JDK-8331167: UBSan enabled build fails in adlc on macOS 8331167: UBSan enabled build fails in adlc on macOS Apr 26, 2024
@openjdk openjdk bot added the rfr Pull request is ready for review label Apr 26, 2024
@openjdk
Copy link

openjdk bot commented Apr 26, 2024

@MBaesken 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 Apr 26, 2024
@mlbridge
Copy link

mlbridge bot commented Apr 26, 2024

Webrevs

Copy link
Member

@tstuefe tstuefe left a comment

Choose a reason for hiding this comment

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

+1

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Apr 26, 2024
Copy link
Contributor

@RealLucy RealLucy 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.

@MBaesken
Copy link
Member Author

Hi Thomas and Lutz, thanks for the reviews !

/integrate

@openjdk
Copy link

openjdk bot commented Apr 29, 2024

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

  • c615c18: 8330158: C2: Loop strip mining uses ABS with min int
  • fb63cba: 8330684: ClassFile API runs into StackOverflowError while parsing certain class' bytes
  • 4e5c25e: 8331108: Unused Math.abs call in java.lang.FdLibm.Expm1#compute
  • 16c7dcd: 8330523: Reduce runtime and improve efficiency of KeepAliveTest
  • c3372c4: 8331134: Port SimpleStringBuilderStrategy to use ClassFile API
  • a078b5e: 8331114: Further improve performance of MethodTypeDesc::descriptorString
  • e3eb652: 8296543: Update exception documentation for ExecutorService.invokeAll overriders as required
  • aa2edd4: 8330686: Fix typos in the DatabaseMetaData javadoc
  • aee91fb: 8296175: Output warning if generated docs contain diagnostic markers
  • a920af2: 8303689: javac -Xlint could/should report on "dangling" doc comments
  • ... and 7 more: https://git.openjdk.org/jdk/compare/e4ed7ced75c53cf5ff40c5dae4830b1ee2589802...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Apr 29, 2024

@MBaesken Pushed as commit 4edac34.

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

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.

3 participants