Page MenuHomePhabricator

llvm-diff: Avoid crash with complex expressions
ClosedPublic

Authored by ddcc on Wed, May 20, 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.Wed, May 20, 6:20 PM
Herald added a project: Restricted Project. · View Herald TranscriptWed, May 20, 6:20 PM
ddcc added a comment.EditedWed, May 20, 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.Wed, May 20, 11:07 PM

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

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