United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-8004713 Stackoverflowerror thrown when thread stack straddles 0x8000000 in 32 bit jvms
JDK-8004713 : Stackoverflowerror thrown when thread stack straddles 0x8000000 in 32 bit jvms

Details
Type:
Bug
Submit Date:
2012-12-07
Status:
Resolved
Updated Date:
2013-06-22
Project Name:
JDK
Resolved Date:
2012-12-14
Component:
hotspot
OS:
Sub-Component:
runtime
CPU:
Priority:
P2
Resolution:
Fixed
Affected Versions:
6u37
Fixed Versions:
hs25 (b14)

Related Reports
Backport:
Backport:
Backport:
Backport:
Backport:

Sub Tasks

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. 
                                     
2012-12-12
URL:   http://hg.openjdk.java.net/hsx/hotspot-comp/hotspot/rev/a70c88896791
User:  kvn
Date:  2012-12-14 06:11:20 +0000

                                     
2012-12-14
URL:   http://hg.openjdk.java.net/hsx/hsx25/hotspot/rev/a70c88896791
User:  amurillo
Date:  2012-12-21 20:28:27 +0000

                                     
2012-12-21



Hardware and Software, Engineered to Work Together