changeset 4243:a398781bfe8b

8008071: Crashed in promote_malloc_records() with Kitchensink after 19 days Summary: Added NULL pointer check for arena size record Reviewed-by: sspitsyn, dholmes
author zgu
date Thu, 21 Feb 2013 07:50:48 -0500
parents 9bf91e181464
children 606aa0fc3944 a71f8a0deaf1
files src/share/vm/services/memSnapshot.cpp
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/services/memSnapshot.cpp	Mon Feb 18 16:47:15 2013 -0800
+++ b/src/share/vm/services/memSnapshot.cpp	Thu Feb 21 07:50:48 2013 -0500
@@ -528,7 +528,8 @@
         // an arena record can be followed by a size record, we need to remove both
         if (matched_rec->is_arena_record()) {
           MemPointerRecord* next = (MemPointerRecord*)malloc_snapshot_itr.peek_next();
-          if (next->is_arena_memory_record() && next->is_memory_record_of_arena(matched_rec)) {
+          if (next != NULL && next->is_arena_memory_record() &&
+              next->is_memory_record_of_arena(matched_rec)) {
             malloc_snapshot_itr.remove();
           }
         }