8011968: Kitchensink crashed with SIGSEGV in MemBaseline::baseline

Fri, 14 Jun 2013 09:18:42 -0400

author
zgu
date
Fri, 14 Jun 2013 09:18:42 -0400
changeset 5261
ab313d4e9a8b
parent 5255
a837fa3d3f86
child 5262
dba2306ee2e3

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 file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/vm/services/memBaseline.cpp	Thu Jun 13 11:16:38 2013 -0700
     1.2 +++ b/src/share/vm/services/memBaseline.cpp	Fri Jun 14 09:18:42 2013 -0400
     1.3 @@ -130,7 +130,7 @@
     1.4        if (malloc_ptr->is_arena_record()) {
     1.5          // see if arena memory record present
     1.6          MemPointerRecord* next_malloc_ptr = (MemPointerRecordEx*)malloc_itr.peek_next();
     1.7 -        if (next_malloc_ptr->is_arena_memory_record()) {
     1.8 +        if (next_malloc_ptr != NULL && next_malloc_ptr->is_arena_memory_record()) {
     1.9            assert(next_malloc_ptr->is_memory_record_of_arena(malloc_ptr),
    1.10               "Arena records do not match");
    1.11            size = next_malloc_ptr->size();

mercurial