This is an archive of the discontinued LLVM Phabricator instance.

Fix for PR30687. Avoid dereferencing MBB.end().
ClosedPublic

Authored by rnk on Oct 13 2016, 8:42 AM.

Details

Summary

This bug is a consequence of

r279314 | dexonsmith | 2016-08-19 13:40:12 -0700 (Fri, 19 Aug 2016) | 110 lines

We hit the "Assertion `!NodePtr->isKnownSentinel()' failed" assertion, but only when inserting a stack probe call at the end of an MBB, which isn't necessarily a common situation.

Diff Detail

Repository
rL LLVM

Event Timeline

DavidKreitzer retitled this revision from to Fix for PR30687. Avoid dereferencing MBB.end()..
DavidKreitzer updated this object.
DavidKreitzer added reviewers: dexonsmith, rnk, hans.
DavidKreitzer added a subscriber: llvm-commits.
rnk edited edge metadata.Oct 13 2016, 8:52 AM

All callers appear to ignore the return value, so IMO we should remove it instead. I'll try that and test it.

rnk commandeered this revision.Oct 13 2016, 8:56 AM
rnk edited reviewers, added: DavidKreitzer; removed: rnk.

Taking over for the test case

This revision was automatically updated to reflect the committed changes.
DavidKreitzer edited edge metadata.Oct 13 2016, 9:05 AM

Thanks for taking care of this, Reid! That fix LGTM.