Skip to content
Permalink
Browse files

8239069: C2: SIGSEGV in IdealGraphPrinter::walk_nodes due to C->root(…

…) being NULL

Fix NULL pointer dereference when trying to print the ideal graph when Compile::record_failure() is called twice.

Reviewed-by: neliasso, thartmann
  • Loading branch information
Christian Hagedorn
Christian Hagedorn committed Feb 17, 2020
1 parent b369aef commit 74bee68872baf8d188a3c2038ab70e910573cc07
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/hotspot/share/opto/idealGraphPrinter.cpp
@@ -664,7 +664,7 @@ void IdealGraphPrinter::print_method(const char *name, int level) {
// Print current ideal graph
void IdealGraphPrinter::print(const char *name, Node *node) {

if (!_current_method || !_should_send_method) return;
if (!_current_method || !_should_send_method || node == NULL) return;

// Warning, unsafe cast?
_chaitin = (PhaseChaitin *)C->regalloc();

0 comments on commit 74bee68

Please sign in to comment.