[PATCH] D157033: [clang][CFG] Fix 2 memory errors in interval computation.

Yitzhak Mandelbaum via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 3 14:05:10 PDT 2023


ymandel created this revision.
ymandel added a reviewer: xazax.hun.
Herald added a reviewer: NoQ.
Herald added a project: All.
ymandel requested review of this revision.
Herald added a project: clang.

This fixes 2 bugs and adds corresponding tests. Both related to unreachable
blocks. One occured in the `WTOCompare` construction, which assumed the size of
the order was the same as the number of blocks in the CFG, which isn't true when
some blocks are unreachable.  The other assumed predecessor pointers were
non-null, which can be false for blocks with unreachable predecessors.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D157033

Files:
  clang/lib/Analysis/IntervalPartition.cpp
  clang/unittests/Analysis/IntervalPartitionTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D157033.546999.patch
Type: text/x-patch
Size: 5760 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230803/454688ab/attachment.bin>


More information about the cfe-commits mailing list