--- old/src/share/vm/classfile/classFileParser.cpp 2013-01-28 14:33:27.858091468 -0500 +++ new/src/share/vm/classfile/classFileParser.cpp 2013-01-28 14:33:27.712089925 -0500 @@ -2167,8 +2167,8 @@ method_parameters_data = cfs->get_u1_buffer(); actual_size += 2 * method_parameters_length; cfs->skip_u2_fast(method_parameters_length); - actual_size += 4 * method_parameters_length; - cfs->skip_u4_fast(method_parameters_length); + actual_size += 2 * method_parameters_length; + cfs->skip_u2_fast(method_parameters_length); // Enforce attribute length if (method_attribute_length != actual_size) { classfile_parse_error( @@ -2319,14 +2319,10 @@ if (method_parameters_length > 0) { MethodParametersElement* elem = m->constMethod()->method_parameters_start(); for(int i = 0; i < method_parameters_length; i++) { - elem[i].name_cp_index = - Bytes::get_Java_u2(method_parameters_data); + elem[i].name_cp_index = Bytes::get_Java_u2(method_parameters_data); + method_parameters_data += 2; + elem[i].flags = Bytes::get_Java_u2(method_parameters_data); method_parameters_data += 2; - u4 flags = Bytes::get_Java_u4(method_parameters_data); - // This caused an alignment fault on Sparc, if flags was a u4 - elem[i].flags_lo = extract_low_short_from_int(flags); - elem[i].flags_hi = extract_high_short_from_int(flags); - method_parameters_data += 4; } } --- old/src/share/vm/oops/constMethod.hpp 2013-01-28 14:33:28.389097081 -0500 +++ new/src/share/vm/oops/constMethod.hpp 2013-01-28 14:33:28.247095580 -0500 @@ -122,12 +122,7 @@ class MethodParametersElement VALUE_OBJ_CLASS_SPEC { public: u2 name_cp_index; - // 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; + u2 flags; }; --- old/src/share/vm/prims/jvm.cpp 2013-01-28 14:33:28.854101997 -0500 +++ new/src/share/vm/prims/jvm.cpp 2013-01-28 14:33:28.712100496 -0500 @@ -1620,7 +1620,7 @@ // For a 0 index, give a NULL symbol Symbol* const sym = 0 != params[i].name_cp_index ? mh->constants()->symbol_at(params[i].name_cp_index) : NULL; - int flags = build_int_from_shorts(params[i].flags_lo, params[i].flags_hi); + int flags = params[i].flags; oop param = Reflection::new_parameter(reflected_method, i, sym, flags, CHECK_NULL); result->obj_at_put(i, param);