This is an archive of the discontinued LLVM Phabricator instance.

llvm-diff: Avoid crash with complex expressions
ClosedPublic

Authored by ddcc on May 20 2020, 6:20 PM.

Details

Summary

With complex IR, the difference engine can enter an inconsistent state where the instruction and block difference engines return different results. Prevent a crash by refusing to pop beyond the end of the vector.

Diff Detail

Event Timeline

ddcc created this revision.May 20 2020, 6:20 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 20 2020, 6:20 PM
ddcc added a comment.EditedMay 20 2020, 6:23 PM

I can trigger the runtime crash when comparing the _ZN13LaplaceSolver6SolverILi3EE22assemble_linear_systemERNS1_12LinearSystemE function from the SPEC2006 benchmark 447.dealII, but unfortunately even with llvm-extract, I haven't been able to generate a simple testcase for this.

rjmccall accepted this revision.May 20 2020, 11:07 PM

This probably shouldn't happen, but okay, it's more defensive programming.

This revision is now accepted and ready to land.May 20 2020, 11:07 PM
This revision was automatically updated to reflect the committed changes.