The macro DEFINE_ALLOCATE_PERMANENT defined in klass.hpp should
check for a NULL return from an allocation.
> if (result == NULL) return NULL; \
A recent change in the macro DEFINE_ALLOCATE_PERMANENT (only
in jdk7) did not correctly account for a NULL return from
an allocation call. The fix is to check the return
from the call to "new" and to return NULL immediately
if the return from "new" was NULL.