changeset 10266:1fcfc045b229

Merge
author minqi
date Fri, 10 May 2013 19:30:12 +0000
parents 92ef81e2f571 (current diff) 0b7f78069732 (diff)
children 8b40495b9381
files
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/prims/jvmtiExport.cpp	Fri May 10 08:27:30 2013 -0700
+++ b/src/share/vm/prims/jvmtiExport.cpp	Fri May 10 19:30:12 2013 +0000
@@ -619,6 +619,9 @@
         // data has been changed by the new retransformable agent
         // and it hasn't already been cached, cache it
         *_cached_data_ptr = (unsigned char *)os::malloc(_curr_len, mtInternal);
+        if (*_cached_data_ptr == NULL) {
+          vm_exit_out_of_memory(_curr_len, OOM_MALLOC_ERROR, "unable to allocate cached copy of original class bytes");
+        }
         memcpy(*_cached_data_ptr, _curr_data, _curr_len);
         *_cached_length_ptr = _curr_len;
       }