JDK-8004713 : Stackoverflowerror thrown when thread stack straddles 0x8000000 in 32 bit jvms
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 6u37
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2012-12-07
  • Updated: 2014-11-17
  • Resolved: 2012-12-14
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 6 JDK 7 JDK 8 Other
6u51Fixed 7u40Fixed 8Fixed hs24Fixed
Description
  
SHORT SUMMARY: 
StackOverflowError incorrectly thrown when thread stack straddles 0x80000000 
in 32 bit SPARC version.
INDICATORS: 
StackOverflowError thrown with plenty of stack available.
COUNTER INDICATORS: 
Not 32 bit SPARC or very little stack available. 
TRIGGERS: 
Interpreter invocation of a method with frame size greater than page size 
(8K) and thread stack straddles 0x80000000.
KNOWN WORKAROUND: 
Move to 64 bit JVM or change heap size and/or stack size to avoid stack 
straddling 0x80000000.
PRESENT SINCE: 
JDK 1.4.2
HOW TO VERIFY: 
Create thread with stack straddling 0x80000000 and invoke method with local 
variables >8K in size. Use pmap or truss to determine stack locations.
NOTES FOR SE: 
See InterpreterGenerator::generate_stack_overflow_check().
REGRESSION: 
No.
  

Comments
Automated regression test would be very difficult because Hotspot does not request specific addresses for thread stacks. Consequently exact placement of thread stacks is highly dependent on other factors such as heap size, OS version and patch level, client vs server compiler, etc. A regression test could be constructed using a native library to force stack placement but that would, of course, not be portable.
12-12-2012