RFR 8030633: nsk/jvmti/RedefineClasses/StressRedefine failed invalid method ordering, length on Solaris
Daniel D. Daugherty
daniel.daugherty at oracle.com
Thu Dec 19 09:24:37 PST 2013
On 12/19/13 9:40 AM, Coleen Phillimore wrote:
> Summary: A method with no declared methods was getting an AME overpass
> method with the latest change. The method_ordering array was not
> updated for the new methods.
> open webrev at http://cr.openjdk.java.net/~coleenp/8030633/
1047 // original_ordering might be empty.
1048 if (JvmtiExport::can_maintain_original_method_order() ||
The original code didn't allocate a non-empty merged_ordering
if original_ordering was NULL or empty. This new code and other
existing uses of original_ordering make the assumption that
original_ordering is !NULL.
I think you need to assert that original_ordering is !NULL
after this line:
1039 Array<int>* original_ordering = klass->method_ordering();
assert(original_ordering != NULL, "sanity check");
I also think that you should only allocate a non-empty
merged_ordering "if (original_ordering->length() > 0_".
1075 assert(original_ordering->length() > 0, "should have ordered this
I'm have a little trouble with the assertion message.
Maybe: "should have original order info for these methods"
> bug link https://bugs.openjdk.java.net/browse/JDK-8030633
> Tested with existing tests
> Needs native code to create new test in jtreg, so I didn't add one.
More information about the hotspot-runtime-dev