initialize Machine::OutOfMemoryError in writeBootImage2

If we don't initialize that at our first opportunity, it's possible
we'll run out of memory later and exit silently instead of printing
the error and returning a nonzero exit code.
This commit is contained in:
Joel Dice 2012-03-27 17:57:11 -06:00
parent 4800518a31
commit a2e0151728

View File

@ -1287,6 +1287,9 @@ writeBootImage2(Thread* t, FILE* bootimageOutput, FILE* codeOutput,
BootImage* image, uint8_t* code, const char* className,
const char* methodName, const char* methodSpec)
{
setRoot(t, Machine::OutOfMemoryError,
make(t, type(t, Machine::OutOfMemoryErrorType)));
Zone zone(t->m->system, t->m->heap, 64 * 1024);
object classPoolMap;