Commit 64e5143d authored by bmeurer's avatar bmeurer Committed by Commit bot

[turbofan] Tentative fix for ControlEquivalence crasher.

The ControlEquivalence cannot deal with new nodes inserted by the
Scheduler due to Node splitting. Rather when the ControlEquivalence
sees such a new Node, it'll likely crash on an out-of-bounds access.

This is a speculative fix to make the crash disappear, as there's no
100% reliable repro currently.

BUG=chromium:629398
TBR=jochen@chromium.org

Review-Url: https://codereview.chromium.org/2611603002
Cr-Commit-Position: refs/heads/master@{#42016}
parent 589ecbfa
......@@ -124,7 +124,11 @@ class V8_EXPORT_PRIVATE ControlEquivalence final
void DetermineParticipation(Node* exit);
private:
NodeData* GetData(Node* node) { return &node_data_[node->id()]; }
NodeData* GetData(Node* node) {
size_t const index = node->id();
if (index >= node_data_.size()) node_data_.resize(index + 1, EmptyData());
return &node_data_[index];
}
int NewClassNumber() { return class_number_++; }
int NewDFSNumber() { return dfs_number_++; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment