update static table class reference in updateClassTables

Commit c918cbc added this reference to ensure
sun.misc.Unsafe.getLongVolatile could be implemented efficiently on
32-bit platforms.  However, I neglected to ensure the reference was
updated to point to the final class instance instead of the temporary
one used in parseClass.  This led to extra memory usage and
inconsistent locking behavior, plus broken bootimage builds.
This commit is contained in:
Joel Dice 2012-10-06 15:25:12 -06:00
parent 45073db421
commit 3a452309b3

View File

@ -2296,6 +2296,11 @@ updateClassTables(Thread* t, object newClass, object oldClass)
}
}
object staticTable = classStaticTable(t, newClass);
if (staticTable) {
set(t, staticTable, SingletonBody, newClass);
}
if (classFlags(t, newClass) & ACC_INTERFACE) {
object virtualTable = classVirtualTable(t, newClass);
if (virtualTable) {