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

8347267: [macOS]: UnixOperatingSystem.c:67:40: runtime error: division by zero #23010

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MBaesken
Copy link
Member

@MBaesken MBaesken commented Jan 9, 2025

When running ubsan-enabled binaries on macOS aarch64, in test
javax/management/MBeanServer/OldMBeanServerTest.java
the following division by zero is shown :
src/jdk.management/macosx/native/libmanagement_ext/UnixOperatingSystem.c:67:40: runtime error: division by zero
UndefinedBehaviorSanitizer:DEADLYSIGNAL
UndefinedBehaviorSanitizer: nested bug in the same thread, aborting.

We should add special handling for the case (total_delta == 0) .


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-8347267: [macOS]: UnixOperatingSystem.c:67:40: runtime error: division by zero (Bug - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 23010

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jan 9, 2025

👋 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 Jan 9, 2025

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

8347267: [macOS]: UnixOperatingSystem.c:67:40: runtime error: division by zero

Reviewed-by: kevinw, cjplummer

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:

  • df28cec: 8345144: Robot does not specify all causes of IllegalThreadStateException
  • 9f3c5f9: 8344907: NullPointerException in Win32ShellFolder2.getSystemIcon when "icon" is null
  • 22f70a7: 8321413: IllegalArgumentException: Code length outside the allowed range while creating a jlink image
  • 3bfa952: 8283795: Add TLSv1.3 and CNSA 1.0 algorithms to implementation requirements
  • 1ef77cd: 8347171: (dc) java/nio/channels/DatagramChannel/InterruptibleOrNot.java fails with virtual thread factory

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-8347267: [macOS]: UnixOperatingSystem.c:67:40: runtime error: division by zero 8347267: [macOS]: UnixOperatingSystem.c:67:40: runtime error: division by zero Jan 9, 2025
@openjdk openjdk bot added the rfr Pull request is ready for review label Jan 9, 2025
@openjdk
Copy link

openjdk bot commented Jan 9, 2025

@MBaesken The following labels will be automatically applied to this pull request:

  • jmx
  • serviceability

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added serviceability serviceability-dev@openjdk.org jmx jmx-dev@openjdk.org labels Jan 9, 2025
@mlbridge
Copy link

mlbridge bot commented Jan 9, 2025

Webrevs

Copy link
Contributor

@kevinjwalls kevinjwalls left a comment

Choose a reason for hiding this comment

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

Hi, looks good.
It is odd that this is never known to happen (zero ticks elapsed!) before, so we might wonder what ubsan is really changing here.
But even if it only happens with ubsan, we can protect ourselves. 8-)

(as long as we aren't changing too much to suit the tool -- we don't seem to be there yet!)

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jmx jmx-dev@openjdk.org ready Pull request is ready to be integrated rfr Pull request is ready for review serviceability serviceability-dev@openjdk.org
Development

Successfully merging this pull request may close these issues.

3 participants