[turbofan] Fixed segmentation fault while printing TurboFan node
Graph trimmer can set Input as null and subsequent printing call could cause segmentation fault. R=bmeurer@chromium.org, jarin@chromium.org Review-Url: https://codereview.chromium.org/2134443002 Cr-Commit-Position: refs/heads/master@{#37658}
This commit is contained in:
parent
992e34c216
commit
1d26ed290b
1
AUTHORS
1
AUTHORS
@ -52,6 +52,7 @@ Chris Nardi <hichris123@gmail.com>
|
||||
Christopher A. Taylor <chris@gameclosure.com>
|
||||
Daniel Andersson <kodandersson@gmail.com>
|
||||
Daniel James <dnljms@gmail.com>
|
||||
Deon Dior <diaoyuanjie@gmail.com>
|
||||
Douglas Crosher <dtc-v8@scieneer.com>
|
||||
Dusan Milosavljevic <dusan.m.milosavljevic@gmail.com>
|
||||
Erich Ocean <erich.ocean@me.com>
|
||||
|
@ -369,7 +369,11 @@ std::ostream& operator<<(std::ostream& os, const Node& n) {
|
||||
os << "(";
|
||||
for (int i = 0; i < n.InputCount(); ++i) {
|
||||
if (i != 0) os << ", ";
|
||||
os << n.InputAt(i)->id();
|
||||
if (n.InputAt(i)) {
|
||||
os << n.InputAt(i)->id();
|
||||
} else {
|
||||
os << "null";
|
||||
}
|
||||
}
|
||||
os << ")";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user