United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6831604 missing null check in guarantee
JDK-6831604 : missing null check in guarantee

Details
Type:
Bug
Submit Date:
2009-04-17
Status:
Closed
Updated Date:
2011-03-08
Project Name:
JDK
Resolved Date:
2011-03-08
Component:
hotspot
OS:
solaris_9
Sub-Component:
compiler
CPU:
sparc
Priority:
P2
Resolution:
Fixed
Affected Versions:
hs16
Fixed Versions:
hs16 (b01)

Related Reports
Backport:
Backport:
Relates:

Sub Tasks

Description
A new guarantee added for 6655638 is causing crashes during dumping.  The code is missing a null check.

                                    

Comments
SUGGESTED FIX

diff --git a/src/share/vm/memory/dump.cpp b/src/share/vm/memory/dump.cpp                                                             
--- a/src/share/vm/memory/dump.cpp                                                                                                   
+++ b/src/share/vm/memory/dump.cpp                                                                                                   
@@ -929,7 +929,8 @@ public:
     guarantee(SystemDictionary::constraints()->number_of_entries() == 0,                                                            
               "loader constraints are not saved");                                                                                  
     // Revisit and implement this if we prelink method handle call sites:                                                           
-    guarantee(SystemDictionary::invoke_method_table()->number_of_entries() == 0,                                                    
+    guarantee(SystemDictionary::invoke_method_table() == NULL ||                                                                    
+              SystemDictionary::invoke_method_table()->number_of_entries() == 0,                                                    
               "invoke method table is not saved");                                                                                  
     GenCollectedHeap* gch = GenCollectedHeap::heap();
                                     
2009-04-17
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot/hotspot/rev/981375ca07b7
                                     
2009-04-18



Hardware and Software, Engineered to Work Together