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

8240211: Stack overflow on Windows 32-bit can lead to crash #137

Closed
wants to merge 1 commit into from

Conversation

arun-joseph
Copy link
Member

@arun-joseph arun-joseph commented Mar 5, 2020

Issue: The stack pointer is checked close to the stack limit during the last iteration of calling frameLoaded() and then, grows beyond the thread's stack range causing a stack overflow and crashes. This occurs as the stack grows by an amount larger than the reserved zone at the end of the stack.

Fix: Reduce the stack range visible to the thread in StackBounds.cpp similar to Mac and Linux. This causes the stack pointer check to throw a StackOverflowError during the last iteration.


Progress

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

Issue

  • JDK-8240211: Stack overflow on Windows 32-bit can lead to crash

Reviewers

  • Guru Hb (ghb - Reviewer)
  • Kevin Rushforth (kcr - Reviewer)
  • Johan Vos (jvos - Reviewer)

Download

$ git fetch https://git.openjdk.java.net/jfx pull/137/head:pull/137
$ git checkout pull/137

@bridgekeeper
Copy link

bridgekeeper bot commented Mar 5, 2020

👋 Welcome back ajoseph! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request.

@openjdk openjdk bot added the rfr Ready for review label Mar 5, 2020
@mlbridge
Copy link

mlbridge bot commented Mar 5, 2020

Webrevs

@kevinrushforth
Copy link
Member

/reviewers 2

@openjdk
Copy link

openjdk bot commented Mar 5, 2020

@kevinrushforth
The number of required reviews for this PR is now set to 2 (with at least 1 of role reviewers).

@kevinrushforth
Copy link
Member

I will review this.

@guruhb can you also review it?

Copy link
Contributor

@guruhb guruhb 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 to me.
I believe you have executed DRT on both 64 & 32 bit build.

@johanvos
Copy link
Collaborator

johanvos commented Mar 5, 2020

This looks correct and very valuable to me. Would be great if there was a test that results in a crash before?

@kevinrushforth
Copy link
Member

Here is a pointer to the apply-style-iframe-crash.html test case that crashes on Windows 32-bit without this fix and passes with this fix.

Copy link
Member

@kevinrushforth kevinrushforth left a comment

Choose a reason for hiding this comment

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

I did a full build / test and verified that on Windows 32-bit the apply-style-iframe-crash.html test crashes without the fix and passes with the fix.

@openjdk
Copy link

openjdk bot commented Mar 5, 2020

@arun-joseph This change now passes all automated pre-integration checks. When the change also fulfills all project specific requirements, type /integrate in a new comment to proceed. After integration, the commit message will be:

8240211: Stack overflow on Windows 32-bit can lead to crash

Reviewed-by: ghb, kcr, jvos
  • If you would like to add a summary, use the /summary command.
  • To credit additional contributors, use the /contributor command.
  • To add additional solved issues, use the /solves command.

Since the source branch of this PR was last updated there has been 1 commit pushed to the master branch. Since there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid automatic rebasing, please merge master into your branch, and then specify the current head hash when integrating, like this: /integrate 337ed722d54564d381a4536ba6d2a8b124becae9.

As you do not have Committer status in this project, an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@guruhb, @kevinrushforth, @johanvos) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the ready Ready to be integrated label Mar 5, 2020
@arun-joseph
Copy link
Member Author

/integrate

@openjdk
Copy link

openjdk bot commented Mar 5, 2020

@arun-joseph
Your change (at version f780c07) is now ready to be sponsored by a Committer.

@openjdk openjdk bot added the sponsor Ready to sponsor label Mar 5, 2020
@kevinrushforth
Copy link
Member

/sponsor

@openjdk openjdk bot closed this Mar 5, 2020
@openjdk openjdk bot added integrated Pull request has been integrated and removed sponsor Ready to sponsor ready Ready to be integrated labels Mar 5, 2020
@openjdk
Copy link

openjdk bot commented Mar 5, 2020

@kevinrushforth @arun-joseph The following commits have been pushed to master since your change was applied:

  • 337ed72: 8237926: Potential memory leak of model data in javafx.scene.control.ListView

Your commit was automatically rebased without conflicts.

Pushed as commit cf0bba6.

@openjdk openjdk bot removed the rfr Ready for review label Mar 5, 2020
@mlbridge
Copy link

mlbridge bot commented Mar 5, 2020

Mailing list message from Kevin Rushforth on openjfx-dev:

Changeset: cf0bba6
Author: Arun Joseph <ajoseph at openjdk.org>
Committer: Kevin Rushforth <kcr at openjdk.org>
Date: 2020-03-05 19:28:25 +0000
URL: https://git.openjdk.java.net/jfx/commit/cf0bba62

8240211: Stack overflow on Windows 32-bit can lead to crash

Reviewed-by: ghb, kcr, jvos

! modules/javafx.web/src/main/native/Source/WTF/wtf/StackBounds.cpp

@arun-joseph arun-joseph deleted the 8240211 branch March 6, 2020 04:33
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
Development

Successfully merging this pull request may close these issues.

4 participants