changeset 4574:9aba4a729302

8011968: Kitchensink crashed with SIGSEGV in MemBaseline::baseline Summary: Simple fix to add NULL pointer check that can cause segv Reviewed-by: coleenp, ctornqvi
author zgu
date Fri, 14 Jun 2013 09:18:42 -0400
parents a51e6c9c3210
children b964a67d19df 1aa21f922568
files src/share/vm/services/memBaseline.cpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/services/memBaseline.cpp	Tue Jun 18 22:45:32 2013 +0200
+++ b/src/share/vm/services/memBaseline.cpp	Fri Jun 14 09:18:42 2013 -0400
@@ -130,7 +130,7 @@
       if (malloc_ptr->is_arena_record()) {
         // see if arena memory record present
         MemPointerRecord* next_malloc_ptr = (MemPointerRecordEx*)malloc_itr.peek_next();
-        if (next_malloc_ptr->is_arena_memory_record()) {
+        if (next_malloc_ptr != NULL && next_malloc_ptr->is_arena_memory_record()) {
           assert(next_malloc_ptr->is_memory_record_of_arena(malloc_ptr),
              "Arena records do not match");
           size = next_malloc_ptr->size();