mirror of
https://github.com/corda/corda.git
synced 2025-06-13 12:48:18 +00:00
acquire class lock before running static initializer; wrap exceptions thrown from static initializers in ExceptionInInitializerError instances
This commit is contained in:
@ -3,6 +3,7 @@
|
||||
#include "machine.h"
|
||||
#include "stream.h"
|
||||
#include "constants.h"
|
||||
#include "run.h"
|
||||
|
||||
using namespace vm;
|
||||
|
||||
@ -948,6 +949,7 @@ parseMethodTable(Thread* t, Stream& s, object class_, object pool)
|
||||
if (strcmp(reinterpret_cast<const int8_t*>("<clinit>"),
|
||||
&byteArrayBody(t, methodName(t, method), 0)) == 0)
|
||||
{
|
||||
methodVmFlags(t, method) |= ClassInitFlag;
|
||||
classVmFlags(t, class_) |= NeedInitFlag;
|
||||
}
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user