src/share/vm/prims/jvmtiExport.cpp

changeset 5095
0b7f78069732
parent 4544
3c9bc17b9403
child 5131
f49e0508a38a
     1.1 --- a/src/share/vm/prims/jvmtiExport.cpp	Wed May 08 21:06:46 2013 -0400
     1.2 +++ b/src/share/vm/prims/jvmtiExport.cpp	Wed May 08 11:21:56 2013 +0200
     1.3 @@ -619,6 +619,9 @@
     1.4          // data has been changed by the new retransformable agent
     1.5          // and it hasn't already been cached, cache it
     1.6          *_cached_data_ptr = (unsigned char *)os::malloc(_curr_len, mtInternal);
     1.7 +        if (*_cached_data_ptr == NULL) {
     1.8 +          vm_exit_out_of_memory(_curr_len, OOM_MALLOC_ERROR, "unable to allocate cached copy of original class bytes");
     1.9 +        }
    1.10          memcpy(*_cached_data_ptr, _curr_data, _curr_len);
    1.11          *_cached_length_ptr = _curr_len;
    1.12        }

mercurial