Skip to content
Permalink
Browse files

8247502: PhaseStringOpts crashes while optimising effectively dead code

Reviewed-by: kvn, thartmann
  • Loading branch information
Vladimir Ivanov
Vladimir Ivanov committed Jul 13, 2020
1 parent deddbe5 commit a14490dd161b9ac9b4f900489fd84e756ff6e740
Showing with 9 additions and 0 deletions.
  1. +9 −0 src/hotspot/share/opto/stringopts.cpp
@@ -540,6 +540,15 @@ StringConcat* PhaseStringOpts::build_candidate(CallStaticJavaNode* call) {
cnode->method()->signature()->as_symbol() == int_sig)) {
sc->add_control(cnode);
Node* arg = cnode->in(TypeFunc::Parms + 1);
if (arg == NULL || arg->is_top()) {
#ifndef PRODUCT
if (PrintOptimizeStringConcat) {
tty->print("giving up because the call is effectively dead");
cnode->jvms()->dump_spec(tty); tty->cr();
}
#endif
break;
}
if (cnode->method()->signature()->as_symbol() == int_sig) {
sc->push_int(arg);
} else if (cnode->method()->signature()->as_symbol() == char_sig) {

0 comments on commit a14490d

Please sign in to comment.
You can’t perform that action at this time.