JDK-8134396 : Check upper limit of flags setting numbers of stack protection pages.
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 9
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2015-08-25
  • Updated: 2024-11-13
  • Resolved: 2015-12-22
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9Resolved
Related Reports
Duplicate :  
Duplicate :  
Description
TestOptionsWithRanges shows that illegal values for red and yellow pages are possible.

In JavaThread::create_stack_guard_pages(),
setting StackRedPages=92233720368547753 and StackYellowPages=1 yields

len = (92233720368547753 + 1) * os::vm_page_size() 
    = 0x8000000000000000 * os::vm_page_size() 
    = 0

Thus not protecting any pages of the stack.

The check in  os::init_2() succeeds, as there the Shadow pages are considered, too, so that the overflowed value is > 0.

On linux, the VM stops with the misleading message
"OpenJDK 64-Bit Server VM warning: Attempt to allocate stack guard pages failed."
On aix, we get assertions and SIGSEGVs.

Comments
This issue is fixed by "8078556: Runtime: implement ranges (optionally constraints) for those flags that have them missing." and "8139864: Improve handling of stack protection zones."
22-12-2015