Skip to content

Conversation

@MBaesken
Copy link
Member

@MBaesken MBaesken commented Jan 3, 2025

When starting :tier1 jdk jtreg tests with
/jtreg_latest/bin/jtreg
this error is show when running ubsanized binaries on macOS aarch64 (XCode 13.1 and 15.4 show this)

src/java.base/unix/native/libjava/ProcessImpl_md.c:561:40: runtime error: applying zero offset to null pointer
#0 0x102a6552c in startChild ProcessImpl_md.c:621
#1 0x102a64480 in Java_java_lang_ProcessImpl_forkAndExec ProcessImpl_md.c:721
#2 0x13f53c4fc ()
#3 0x13f5387cc ()
#4 0x13f53894c ()
#5 0x13f5386dc ()
#6 0x13f5386dc ()
#7 0x13f5386dc ()
#8 0x13f53894c ()
#9 0x13f53894c ()
#10 0x13f534110 ()
#11 0x107de60e0 in JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, JavaThread*) javaCalls.cpp:416
#12 0x107ebf778 in jni_invoke_static(JNIEnv_, JavaValue, _jobject*, JNICallType, _jmethodID*, JNI_ArgumentPusher*, JavaThread*) jni.cpp:885
#13 0x107ec2778 in jni_CallStaticVoidMethod jni.cpp:1714
#14 0x102e86210 in invokeStaticMainWithArgs java.c:392
#15 0x102e884e8 in JavaMain java.c:640
#16 0x102e8d79c in ThreadJavaMain java_md_macosx.m:679
#17 0x19d38ef90 in _pthread_start+0x84 (libsystem_pthread.dylib:arm64e+0x6f90)
#18 0x19d389d30 in thread_start+0x4 (libsystem_pthread.dylib:arm64e+0x1d30)

Looks similar to
https://www.reddit.com/r/C_Programming/comments/133oxnc/null_0_is_ub_this_is_not_what_you_would_expect/?rdt=41590
and
https://trac.ffmpeg.org/changeset/9c0b3eddf4262f9dcea479091f1307444e614e88/ffmpeg


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-8345676: [ubsan] ProcessImpl_md.c:561:40: runtime error: applying zero offset to null pointer on macOS aarch64 (Bug - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 22910

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jan 3, 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 3, 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:

8345676: [ubsan] ProcessImpl_md.c:561:40: runtime error: applying zero offset to null pointer on macOS aarch64

Reviewed-by: rriggs

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

  • 07c9f71: 8346921: Remove unused arg in markWord::must_be_preserved

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-8345676: [ubsan] ProcessImpl_md.c:561:40: runtime error: applying zero offset to null pointer on macOS aarch64 8345676: [ubsan] ProcessImpl_md.c:561:40: runtime error: applying zero offset to null pointer on macOS aarch64 Jan 3, 2025
@openjdk openjdk bot added the rfr Pull request is ready for review label Jan 3, 2025
@openjdk
Copy link

openjdk bot commented Jan 3, 2025

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

  • core-libs

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.

@mlbridge
Copy link

mlbridge bot commented Jan 3, 2025

Webrevs

Copy link
Contributor

@RogerRiggs RogerRiggs 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, thanks

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jan 3, 2025
@MBaesken
Copy link
Member Author

MBaesken commented Jan 7, 2025

Hi Roger, thanks for the review !

/integrate

@openjdk
Copy link

openjdk bot commented Jan 7, 2025

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

  • 0a81676: 8346881: [ubsan] logSelection.cpp:154:24 / logSelectionList.cpp:72:94 : runtime error: applying non-zero offset 1 to null pointer
  • 08debd3: 8346993: C2 SuperWord: refactor to make more vector nodes available in VectorNode::make
  • de02503: 8346832: runtime/CompressedOops/CompressedCPUSpecificClassSpaceReservation.java fails on RISC-V
  • 27646e5: 8344148: Add an explicit compiler phase for warning generation
  • 8d388cc: 8346457: AOT cache creation crashes with "assert(pair_at(i).match() < pair_at(i+1).match()) failed: unsorted table entries"
  • d723597: 8345432: (ch, fs) Replace anonymous Thread with InnocuousThread
  • 9c393a2: 8346953: Remove unnecessary @SuppressWarnings annotations (client, Make "can write" check work on Windows #2)
  • 9a60f44: 8345668: ZoneOffset.ofTotalSeconds performance regression
  • 12700cb: 8346264: "Total compile time" counter should include time spent in failing/bailout compiles
  • dd81f8d: 8344079: Minor fixes and cleanups to compiler lint-related code
  • ... and 10 more: https://git.openjdk.org/jdk/compare/84e6432bb73e35b32f12cdc0e1a172b7c973e618...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Jan 7, 2025

@MBaesken Pushed as commit 0285020.

💡 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

core-libs [email protected] integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

2 participants