Skip to content
Permalink
Browse files
8247502: PhaseStringOpts crashes while optimising effectively dead code
Backport-of: a14490d
  • Loading branch information
Olga Mikhaltsova authored and Yuri Nesterenko committed Apr 26, 2021
1 parent 6389acf commit d61430b69cc9c7f1324d520d938675b7bfc31f15
Showing with 9 additions and 0 deletions.
  1. +9 −0 src/hotspot/share/opto/stringopts.cpp
@@ -539,6 +539,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) {

1 comment on commit d61430b

@openjdk-notifier

This comment has been minimized.

Copy link

@openjdk-notifier openjdk-notifier bot commented on d61430b Apr 26, 2021

Please sign in to comment.