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

JDK-8266506: [aix] Treat mapping attempt too close to BRK as a mapping error #3859

Conversation

tstuefe
Copy link
Member

@tstuefe tstuefe commented May 4, 2021

On AIX, in os::attempt_reserve_memory_at(), if the user specified a wish address too close to the BRK segment, we silently ignore the wish address and just map anywhere.

This is not the right behavior since the normal behavior when failing to map to a wish address is to return NULL (see JDK-8266419). Therefore we should return NULL in these cases instead.

This is a day zero bug.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8266506: [aix] Treat mapping attempt too close to BRK as a mapping error

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/3859/head:pull/3859
$ git checkout pull/3859

Update a local copy of the PR:
$ git checkout pull/3859
$ git pull https://git.openjdk.java.net/jdk pull/3859/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 3859

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/3859.diff

@bridgekeeper
Copy link

bridgekeeper bot commented May 4, 2021

👋 Welcome back stuefe! 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 May 4, 2021

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

  • hotspot-runtime

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-runtime label May 4, 2021
@tstuefe tstuefe marked this pull request as ready for review May 5, 2021
@openjdk openjdk bot added the rfr label May 5, 2021
@mlbridge
Copy link

mlbridge bot commented May 5, 2021

Webrevs

Copy link
Contributor

@TheRealMDoerr TheRealMDoerr left a comment

Looks good. Thanks for fixing. You may want to update the trace message "Will attach anywhere.".

@openjdk
Copy link

openjdk bot commented May 5, 2021

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

8266506: [aix] Treat mapping attempt too close to BRK as a mapping error

Reviewed-by: mdoerr

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

  • 02cdd6e: 8266419: [aix] in mmap mode, os::attempt_reserve_memory_at() fails to handle wrong mapping address
  • 250b45a: 8266222: [aix] In mmap-mode, partial releases with os::release_memory may trash internal bookkeeping
  • 65ce4d2: 8266491: Remove resolve and obj_equals leftovers from BarrierSetAssembler
  • a8046c9: 8266436: Synthetic constructor trees have non-null return type
  • c9873c4: 8260621: (jrtfs) ThreadLocal memory leak in ImageBufferCache when using jrtfs
  • 82768d9: 8221503: vmTestbase/nsk/jdb/eval/eval001/eval001.java fails with: com.sun.jdi.InvalidTypeException: Can't assign double[][][] to double[][][]
  • b71f85a: 8264398: BevelBorderUIResource​(int, Color, Color) and BevelBoder(int, Color, Color) spec should clarify about usage of highlight and shadow color
  • b172555: 8266171: -Warray-bounds happens in imageioJPEG.c
  • 8bcebe7: 8265505: findsym does not work on remote debug server
  • b88785d: 8266038: Move newAddress() to JVMDebugger
  • ... and 106 more: https://git.openjdk.java.net/jdk/compare/343a4a76f273078f78897e8fb7e695bc2c111536...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 label May 5, 2021
@tstuefe
Copy link
Member Author

tstuefe commented May 5, 2021

Looks good. Thanks for fixing. You may want to update the trace message "Will attach anywhere.".

Again you are right. I will fix before pushing.

@tstuefe
Copy link
Member Author

tstuefe commented May 5, 2021

Note that since we don't have that many AIX reviewers, and this only concerns AIX code, I go ahead and push. It is our port anyway, if something breaks we will have to fix it.

/integrate

@openjdk openjdk bot closed this May 5, 2021
@openjdk openjdk bot added integrated and removed ready rfr labels May 5, 2021
@openjdk
Copy link

openjdk bot commented May 5, 2021

@tstuefe Since your change was applied there have been 116 commits pushed to the master branch:

  • 02cdd6e: 8266419: [aix] in mmap mode, os::attempt_reserve_memory_at() fails to handle wrong mapping address
  • 250b45a: 8266222: [aix] In mmap-mode, partial releases with os::release_memory may trash internal bookkeeping
  • 65ce4d2: 8266491: Remove resolve and obj_equals leftovers from BarrierSetAssembler
  • a8046c9: 8266436: Synthetic constructor trees have non-null return type
  • c9873c4: 8260621: (jrtfs) ThreadLocal memory leak in ImageBufferCache when using jrtfs
  • 82768d9: 8221503: vmTestbase/nsk/jdb/eval/eval001/eval001.java fails with: com.sun.jdi.InvalidTypeException: Can't assign double[][][] to double[][][]
  • b71f85a: 8264398: BevelBorderUIResource​(int, Color, Color) and BevelBoder(int, Color, Color) spec should clarify about usage of highlight and shadow color
  • b172555: 8266171: -Warray-bounds happens in imageioJPEG.c
  • 8bcebe7: 8265505: findsym does not work on remote debug server
  • b88785d: 8266038: Move newAddress() to JVMDebugger
  • ... and 106 more: https://git.openjdk.java.net/jdk/compare/343a4a76f273078f78897e8fb7e695bc2c111536...master

Your commit was automatically rebased without conflicts.

Pushed as commit 0ac84d1.

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

@tstuefe tstuefe deleted the JDK-8266506-aix-treat-mapping-attempts-too-close-to-brk-as-mapping-error branch May 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-runtime integrated
2 participants