Mercurial > hg > graal-compiler
diff src/share/vm/oops/constMethod.hpp @ 7588:f9eb431c3efe
8006005: Fix constant pool index validation and alignment trap for method parameter reflection
Summary: This patch addresses an alignment trap due to the storage format of method parameters data in constMethod. It also adds code to validate constant pool indexes for method parameters data.
Reviewed-by: jrose, dholmes
Contributed-by: eric.mccorkle@oracle.com
author | coleenp |
---|---|
date | Mon, 14 Jan 2013 11:01:39 -0500 |
parents | ade95d680b42 |
children | 16fb9f942703 |
line wrap: on
line diff
--- a/src/share/vm/oops/constMethod.hpp Fri Jan 11 09:53:24 2013 -0800 +++ b/src/share/vm/oops/constMethod.hpp Mon Jan 14 11:01:39 2013 -0500 @@ -122,7 +122,12 @@ class MethodParametersElement VALUE_OBJ_CLASS_SPEC { public: u2 name_cp_index; - u4 flags; + // This has to happen, otherwise it will cause SIGBUS from a + // misaligned u4 on some architectures (ie SPARC) + // because MethodParametersElements are only aligned mod 2 + // within the ConstMethod container u2 flags_hi; + u2 flags_hi; + u2 flags_lo; };