United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 6792301 StackAlignmentInBytes not honored for compiled native methods
6792301 : StackAlignmentInBytes not honored for compiled native methods

Details
Type:
Bug
Submit Date:
2009-01-10
Status:
Closed
Updated Date:
2012-10-08
Project Name:
JDK
Resolved Date:
2009-02-11
Component:
hotspot
OS:
generic
Sub-Component:
runtime
CPU:
generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:
hs15

Related Reports
Backport:
Backport:

Sub Tasks

Description
Crashes have been observed using SoyLatte and the BSD port of OpenJDK on Mac OS X with applications involving many native calls, specifically graphical programs. Various parties have identified the reason as misalignment of the stack; Mac OS X requires 16-byte alignment of stack frames even on 32-bit platforms. While StackAlignmentInBytes is defined as 16 in 32-bit x86 HotSpot, the compiled native wrappers for frequently invoked JNI methods are not appropriately rounding up the frame size. It appears that this is the only place in the VM where the stack alignment is not being obeyed.

                                    

Comments
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-rt/hotspot/rev/c9004fe53695
                                     
2009-01-14
EVALUATION

There is a missing stack alignment operation before the generated code calls out the native method.
                                     
2009-01-10



Hardware and Software, Engineered to Work Together