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

Arun Joseph ajoseph at openjdk.java.net
Thu Mar 5 14:57:27 UTC 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](https://github.com/openjdk/jfx/blob/master/modules/javafx.web/src/main/native/Source/WTF/wtf/StackBounds.cpp) similar to Mac and Linux. This causes the stack pointer check to throw a StackOverflowError during the last iteration.

-------------

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

Changes: https://git.openjdk.java.net/jfx/pull/137/files
 Webrev: https://webrevs.openjdk.java.net/jfx/137/webrev.00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8240211
  Stats: 3 lines in 1 file changed: 3 ins; 0 del; 0 mod
  Patch: https://git.openjdk.java.net/jfx/pull/137.diff
  Fetch: git fetch https://git.openjdk.java.net/jfx pull/137/head:pull/137

PR: https://git.openjdk.java.net/jfx/pull/137


More information about the openjfx-dev mailing list