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

8294316: SA core file support is broken on macosx-x64 starting with macOS 12.x #14569

Closed
wants to merge 6 commits into from

Conversation

tkrodriguez
Copy link
Contributor

@tkrodriguez tkrodriguez commented Jun 20, 2023

This is a minor fix to core file reading on macos x. I can confirm that after this fix I can run the problem listed SA core file tests on Ventura.


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-8294316: SA core file support is broken on macosx-x64 starting with macOS 12.x (Bug - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 14569

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jun 20, 2023

👋 Welcome back never! 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 openjdk bot added the rfr Pull request is ready for review label Jun 20, 2023
@openjdk
Copy link

openjdk bot commented Jun 20, 2023

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

  • serviceability

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 serviceability serviceability-dev@openjdk.org label Jun 20, 2023
@mlbridge
Copy link

mlbridge bot commented Jun 20, 2023

Webrevs

Comment on lines 307 to 309
print_debug("LC_SEGMENT_64 added: nsects=%d fileoff=0x%llx vmaddr=0x%llx vmsize=0x%llx filesize=0x%llx %s\n",
segcmd.nsects, segcmd.fileoff, segcmd.vmaddr, segcmd.vmsize,
segcmd.filesize, &segcmd.segname[0]);
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be nice to include this print_debug for the filesize == 0 case. Maybe you can move it outside of the if and print added or skipped conditional on filesize.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea. I've flattened the ifs a little and fixed the message.

@openjdk
Copy link

openjdk bot commented Jun 22, 2023

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

8294316: SA core file support is broken on macosx-x64 starting with macOS 12.x

Reviewed-by: cjplummer, sspitsyn

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

  • 289f218: 8310861: Improve location reporting for javac serial lint warnings
  • d32eb01: 8310682: No package-info (and @SInCE) for package jdk.nio.mapmode
  • e624484: 8308540: On Kerberos TGT referral, if krb5.conf is missing realm, bad exception message
  • 5ff42d1: 8303549: [AIX] TestNativeStack.java is failing with exit value 1
  • 24abd10: 8310192: RISC-V: Merge vector min & max instructs with similar match rules
  • 3357867: 8310276: RISC-V: Make use of shadd macro-assembler function when possible
  • c1c5bd0: 8310541: G1: Remove redundant check in G1Policy::need_to_start_conc_mark
  • 5271f4d: 8310354: G1: Annotate G1MMUTracker::when_sec with const
  • a420ff4: 6664309: Docking point of a floating toolbar changes after closing
  • a96e92c: 8310816: GcInfoBuilder float/double signature mismatch
  • ... and 71 more: https://git.openjdk.org/jdk/compare/b2e86aef65f4d579896b6db83aaad408b6c580d4...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 added the ready Pull request is ready to be integrated label Jun 22, 2023
Copy link
Contributor

@sspitsyn sspitsyn 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,
Serguei

Copy link
Contributor

@sspitsyn sspitsyn left a comment

Choose a reason for hiding this comment

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

Update looks good.
Thanks,
Serguei

if (add_map_info(ph, fd, segcmd.fileoff, segcmd.vmaddr, segcmd.vmsize, segcmd.flags) == NULL) {
// The base of the library is offset by a random amount which ends up as a load command with a
// filesize of 0. This must be ignored otherwise the base address of the library is wrong.
if (segcmd.filesize != 0 && add_map_info(ph, fd, segcmd.fileoff, segcmd.vmaddr, segcmd.vmsize, segcmd.flags) == NULL) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I actually preferred this part with two if statements. Seems easier to read that way.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok. I reverted it to 2 ifs.

Copy link
Contributor

@plummercj plummercj left a comment

Choose a reason for hiding this comment

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

Please update the copyright before integrating.

@tkrodriguez
Copy link
Contributor Author

Thanks!

/integrate

@openjdk
Copy link

openjdk bot commented Jun 27, 2023

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

  • 4bce38c: 8310830: typo in the parameter name in @throws of ClassDesc::ofDescriptor
  • 315242b: 8310975: java.util.FormatItemModifier should not be protected
  • d6dd0dc: 8308452: Extend internal Architecture enum with byte order and address size
  • fb283df: 8310828: java.sql java.sql.rowset packages have no @since info
  • ec45bd6: 8310182: DateTimeFormatter date formats (ISO_LOCAL_DATE) separated with hyphen, not dash
  • 2bd4136: 8310849: Pattern matching for instanceof and arrayType cleanup in j.l.invoke and j.l.reflect
  • 7ce967a: 8281455: Change JVM options with small ranges from 64 to 32 bits, for gc_globals.hpp
  • f6133ed: 8310890: Normalize identifier names
  • 58bb655: 8222329: Readable read(CharBuffer) does not specify that 0 is returned when there is no remaining space in buffer
  • 05e9c41: 8310731: Configure a javax.net.ssl.SNIMatcher for the HTTP/1.1 test servers in java/net/httpclient tests
  • ... and 97 more: https://git.openjdk.org/jdk/compare/b2e86aef65f4d579896b6db83aaad408b6c580d4...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Jun 27, 2023

@tkrodriguez Pushed as commit 269852b.

💡 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
integrated Pull request has been integrated serviceability serviceability-dev@openjdk.org
3 participants