7032407: Crash in LinkResolver::runtime_resolve_virtual_method()

Make CDS reorder vtables so that dump time vtables match run time order, so when redefine classes reinitializes them, they aren't in the wrong order.

Reviewed-by: dcubed, acorn
This commit is contained in:
Coleen Phillimore 2011-04-15 09:36:28 -04:00
parent 2a5436b3d3
commit 8acea1848a
7 changed files with 75 additions and 13 deletions

View file

@ -75,7 +75,15 @@ class klassVtable : public ResourceObj {
void initialize_vtable(bool checkconstraints, TRAPS); // initialize vtable of a new klass
// conputes vtable length (in words) and the number of miranda methods
// CDS/RedefineClasses support - clear vtables so they can be reinitialized
// at dump time. Clearing gives us an easy way to tell if the vtable has
// already been reinitialized at dump time (see dump.cpp). Vtables can
// be initialized at run time by RedefineClasses so dumping the right order
// is necessary.
void clear_vtable();
bool is_initialized();
// computes vtable length (in words) and the number of miranda methods
static void compute_vtable_size_and_num_mirandas(int &vtable_length, int &num_miranda_methods,
klassOop super, objArrayOop methods,
AccessFlags class_flags, Handle classloader,