OSDN Git Service

llvm-diff: Avoid crash with complex expressions
authorDominic Chen <d.c.ddcc@gmail.com>
Thu, 21 May 2020 01:11:23 +0000 (21:11 -0400)
committerDominic Chen <d.c.ddcc@gmail.com>
Thu, 21 May 2020 21:43:47 +0000 (17:43 -0400)
commit31984063678ef523b940160ac9d49fcb87c1e2ac
tree30102a64f40018b34bb9c019689831368846d666
parentf85aedc167cde76bdb47b7814f873cfb40ad3ed8
llvm-diff: Avoid crash with complex expressions

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.

Reviewers: rjmccall

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D80351
llvm/tools/llvm-diff/DifferenceEngine.cpp