8199793: [Graal] runtime/CommandLine/PrintTouchedMethods.java crashes with assertion "reference count underflow for symbol"

Remove Symbol::set_permanent to avoid possible race conditions

Reviewed-by: coleenp, dholmes, thartmann
This commit is contained in:
Ioi Lam 2018-03-26 17:40:54 -07:00
parent 7804f9b1e2
commit 33c908457b
2 changed files with 4 additions and 11 deletions

View file

@ -2372,9 +2372,9 @@ void Method::log_touched(TRAPS) {
ptr = ptr->_next;
}
TouchedMethodRecord* nptr = NEW_C_HEAP_OBJ(TouchedMethodRecord, mtTracing);
my_class->set_permanent(); // prevent reclaimed by GC
my_name->set_permanent();
my_sig->set_permanent();
my_class->increment_refcount();
my_name->increment_refcount();
my_sig->increment_refcount();
nptr->_class_name = my_class;
nptr->_method_name = my_name;
nptr->_method_signature = my_sig;