6969586: OptimizeStringConcat: SIGSEGV in LoadNode::Value()
authornever
Mon, 30 Aug 2010 17:27:35 -0700
changeset 6436 92ab86f565f8
parent 6435 ef0a074fdf62
child 6437 f418278cea0f
6969586: OptimizeStringConcat: SIGSEGV in LoadNode::Value() Reviewed-by: kvn
hotspot/src/share/vm/opto/memnode.cpp
--- a/hotspot/src/share/vm/opto/memnode.cpp	Mon Aug 30 11:02:53 2010 -0700
+++ b/hotspot/src/share/vm/opto/memnode.cpp	Mon Aug 30 17:27:35 2010 -0700
@@ -1547,8 +1547,8 @@
         adr->is_AddP() && off != Type::OffsetBot) {
       // For constant Strings treat the fields as compile time constants.
       Node* base = adr->in(AddPNode::Base);
-      if (base->Opcode() == Op_ConP) {
-        const TypeOopPtr* t = phase->type(base)->isa_oopptr();
+      const TypeOopPtr* t = phase->type(base)->isa_oopptr();
+      if (t != NULL && t->singleton()) {
         ciObject* string = t->const_oop();
         ciConstant constant = string->as_instance()->field_value_by_offset(off);
         if (constant.basic_type() == T_INT) {