8035729: Code using assert(is_oop_or_null) needs better error messages

Modified error messages to include the oops

Reviewed-by: stefank, tschatzl
This commit is contained in:
Marcus Larsson 2014-09-18 11:04:00 +02:00
parent d90a333e5b
commit 59bc281604
9 changed files with 23 additions and 21 deletions

View file

@ -331,7 +331,7 @@ void GenericTaskQueue<E, F, N>::oops_do(OopClosure* f) {
// index, &_elems[index], _elems[index]);
E* t = (E*)&_elems[index]; // cast away volatility
oop* p = (oop*)t;
assert((*t)->is_oop_or_null(), "Not an oop or null");
assert((*t)->is_oop_or_null(), err_msg("Expected an oop or NULL at " PTR_FORMAT, p2i(*t)));
f->do_oop(p);
}
// tty->print_cr("END OopTaskQueue::oops_do");