Mercurial > hg > graal-compiler
comparison 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 |
comparison
equal
deleted
inserted
replaced
7586:90a92d5bca17 | 7588:f9eb431c3efe |
---|---|
120 | 120 |
121 // Utility class describing elements in method parameters | 121 // Utility class describing elements in method parameters |
122 class MethodParametersElement VALUE_OBJ_CLASS_SPEC { | 122 class MethodParametersElement VALUE_OBJ_CLASS_SPEC { |
123 public: | 123 public: |
124 u2 name_cp_index; | 124 u2 name_cp_index; |
125 u4 flags; | 125 // This has to happen, otherwise it will cause SIGBUS from a |
126 // misaligned u4 on some architectures (ie SPARC) | |
127 // because MethodParametersElements are only aligned mod 2 | |
128 // within the ConstMethod container u2 flags_hi; | |
129 u2 flags_hi; | |
130 u2 flags_lo; | |
126 }; | 131 }; |
127 | 132 |
128 | 133 |
129 class ConstMethod : public MetaspaceObj { | 134 class ConstMethod : public MetaspaceObj { |
130 friend class VMStructs; | 135 friend class VMStructs; |