comparison src/share/vm/opto/machnode.cpp @ 10279:70120f47d403

8014189: JVM crash with SEGV in ConnectionGraph::record_for_escape_analysis() Summary: Add NULL checks and asserts for Type::make_ptr() returned value. Reviewed-by: twisti
author kvn
date Thu, 09 May 2013 17:28:04 -0700
parents a7114d3d712e
children 190899198332
comparison
equal deleted inserted replaced
10278:6f3fd5150b67 10279:70120f47d403
347 347
348 // base of -1 with no particular offset means all of memory 348 // base of -1 with no particular offset means all of memory
349 if (base == NodeSentinel) return TypePtr::BOTTOM; 349 if (base == NodeSentinel) return TypePtr::BOTTOM;
350 350
351 const Type* t = base->bottom_type(); 351 const Type* t = base->bottom_type();
352 if (UseCompressedOops && Universe::narrow_oop_shift() == 0) { 352 if (t->isa_narrowoop() && Universe::narrow_oop_shift() == 0) {
353 // 32-bit unscaled narrow oop can be the base of any address expression 353 // 32-bit unscaled narrow oop can be the base of any address expression
354 t = t->make_ptr(); 354 t = t->make_ptr();
355 } 355 }
356 if (UseCompressedKlassPointers && Universe::narrow_klass_shift() == 0) { 356 if (t->isa_narrowklass() && Universe::narrow_klass_shift() == 0) {
357 // 32-bit unscaled narrow oop can be the base of any address expression 357 // 32-bit unscaled narrow oop can be the base of any address expression
358 t = t->make_ptr(); 358 t = t->make_ptr();
359 } 359 }
360 if (t->isa_intptr_t() && offset != 0 && offset != Type::OffsetBot) { 360 if (t->isa_intptr_t() && offset != 0 && offset != Type::OffsetBot) {
361 // We cannot assert that the offset does not look oop-ish here. 361 // We cannot assert that the offset does not look oop-ish here.