7045513: JSR 292 inlining causes crashes in methodHandleWalk.cpp

Reviewed-by: jrose
This commit is contained in:
Tom Rodriguez 2011-05-17 19:11:51 -07:00
parent 4b893d695b
commit c2f2cb75fc
15 changed files with 331 additions and 61 deletions

View file

@ -203,11 +203,14 @@ void print_oop(oop value, outputStream* st) {
if (value == NULL) {
st->print_cr(" NULL");
} else if (java_lang_String::is_instance(value)) {
EXCEPTION_MARK;
Handle h_value (THREAD, value);
Symbol* sym = java_lang_String::as_symbol(h_value, CATCH);
print_symbol(sym, st);
sym->decrement_refcount();
char buf[40];
int len = java_lang_String::utf8_length(value);
java_lang_String::as_utf8_string(value, buf, sizeof(buf));
if (len >= (int)sizeof(buf)) {
st->print_cr(" %s...[%d]", buf, len);
} else {
st->print_cr(" %s", buf);
}
} else {
st->print_cr(" " PTR_FORMAT, (intptr_t) value);
}