[PATCH] D80351: llvm-diff: Avoid crash with complex expressions

Dominic Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 21 15:13:25 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rG31984063678e: llvm-diff: Avoid crash with complex expressions (authored by ddcc).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80351/new/

https://reviews.llvm.org/D80351

Files:
  llvm/tools/llvm-diff/DifferenceEngine.cpp


Index: llvm/tools/llvm-diff/DifferenceEngine.cpp
===================================================================
--- llvm/tools/llvm-diff/DifferenceEngine.cpp
+++ llvm/tools/llvm-diff/DifferenceEngine.cpp
@@ -577,7 +577,7 @@
   DiffLogBuilder Diff(Engine.getConsumer());
 
   // Drop trailing matches.
-  while (Path.back() == DC_match)
+  while (Path.size() && Path.back() == DC_match)
     Path.pop_back();
 
   // Skip leading matches.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80351.265624.patch
Type: text/x-patch
Size: 443 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200521/7e84c1c7/attachment.bin>


More information about the llvm-commits mailing list