changeset 4326:8b4ce9870fd6

8009156: [parfait] Null pointer deference in hotspot/src/share/vm/services/memoryService.cpp Summary: add guarantee() to add_generation_memory_pool() Reviewed-by: kvn, twisti
author morris
date Sat, 16 Mar 2013 07:39:57 -0700
parents 96ef09c26978
children 0a2deac0bbfb
files src/share/vm/services/memoryService.cpp
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/services/memoryService.cpp	Sat Mar 16 07:39:14 2013 -0700
+++ b/src/share/vm/services/memoryService.cpp	Sat Mar 16 07:39:57 2013 -0700
@@ -240,6 +240,7 @@
 void MemoryService::add_generation_memory_pool(Generation* gen,
                                                MemoryManager* major_mgr,
                                                MemoryManager* minor_mgr) {
+  guarantee(gen != NULL, "No generation for memory pool");
   Generation::Name kind = gen->kind();
   int index = _pools_list->length();