From 18ce53ad1a7b7b77f5dc2a51681d4cb953915704 Mon Sep 17 00:00:00 2001 From: zgu Date: Fri, 14 Jun 2013 09:18:42 -0400 Subject: [PATCH] 8011968: Kitchensink crashed with SIGSEGV in MemBaseline::baseline Summary: Simple fix to add NULL pointer check that can cause segv Reviewed-by: coleenp, ctornqvi --- src/share/vm/services/memBaseline.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/share/vm/services/memBaseline.cpp b/src/share/vm/services/memBaseline.cpp index c2d04106c..21eb8b5d4 100644 --- a/src/share/vm/services/memBaseline.cpp +++ b/src/share/vm/services/memBaseline.cpp @@ -130,7 +130,7 @@ bool MemBaseline::baseline_malloc_summary(const MemPointerArray* malloc_records) 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(); -- GitLab