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

8265757: stack-use-after-scope in perfMemory_posix.cpp get_user_name_slow() #3630

Closed
wants to merge 1 commit into from

Conversation

hseigel
Copy link
Member

@hseigel hseigel commented Apr 22, 2021

Please review this small change to fix JDK-8265757. The fix was tested with Mach5 tiers 1 and 2 on Linux, MacOS aarch64, and Windows.

Thanks, Harold


Progress

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

Issue

  • JDK-8265757: stack-use-after-scope in perfMemory_posix.cpp get_user_name_slow()

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 3630

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Apr 22, 2021

👋 Welcome back hseigel! 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 Apr 22, 2021
@openjdk
Copy link

openjdk bot commented Apr 22, 2021

@hseigel 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 hotspot-runtime-dev@openjdk.org label Apr 22, 2021
@mlbridge
Copy link

mlbridge bot commented Apr 22, 2021

Webrevs

Copy link
Member

@lfoltan lfoltan left a comment

Choose a reason for hiding this comment

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

LGTM.
Lois

@openjdk
Copy link

openjdk bot commented Apr 22, 2021

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

8265757: stack-use-after-scope in perfMemory_posix.cpp get_user_name_slow()

Reviewed-by: lfoltan, dcubed

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:

  • 9499175: 8261090: Store old classfiles in static CDS archive

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 added the ready Pull request is ready to be integrated label Apr 22, 2021
Copy link
Member

@dcubed-ojdk dcubed-ojdk left a comment

Choose a reason for hiding this comment

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

Thumbs up.

@hseigel
Copy link
Member Author

hseigel commented Apr 22, 2021

Thanks Lois and Dan for the reviews.
Harold

@@ -527,6 +527,7 @@ static char* get_user_name_slow(int vmid, int nspid, TRAPS) {
// directory search
char* oldest_user = NULL;
time_t oldest_ctime = 0;
char buffer[MAXPATHLEN + 1];
Copy link
Member

Choose a reason for hiding this comment

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

If you move this inside the #if defined(LINUX) it would be better. No risk of perturbing other platforms then.

@hseigel
Copy link
Member Author

hseigel commented Apr 27, 2021

Thanks Lois and Dan for reviewing this.

/integrate

@openjdk openjdk bot closed this Apr 27, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Apr 27, 2021
@openjdk
Copy link

openjdk bot commented Apr 27, 2021

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

  • e4be968: 8265980: Fix systemDictionary and loaderConstraints printing
  • f6e26f6: 8265756: AArch64: initialize memory allocated for locals according to Windows AArch64 stack page growth requirement in template interpreter
  • 0a4c338: 8263432: javac may report an invalid package/class clash on case insensitive filesystems
  • 82b3719: 8265967: Unused NullCheckNode forward declaration in node.hpp
  • 468c847: 8234020: Remove FullGCCount_lock
  • 4785e11: 8264806: Remove the experimental JIT compiler
  • 7db9330: 8196300: java/awt/TextArea/TextAreaScrolling/TextAreaScrolling.java times out
  • 694aced: 8264805: Remove the experimental Ahead-of-Time Compiler
  • 15d4787: 8265496: improve null check in DeflaterOutputStream/InflaterInputStream
  • 1d37b98: 8265972: Remove declarations with no implementations in javaClasses.hpp
  • ... and 68 more: https://git.openjdk.java.net/jdk/compare/159f5e1edec0e65a0bd645ef3c9217728eaf3a28...master

Your commit was automatically rebased without conflicts.

Pushed as commit 879a77f.

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