[all-commits] [llvm/llvm-project] 631d16: [SSAF][WPA] Bounds propagation graph is a supergra...
Ziqing Luo via All-commits
all-commits at lists.llvm.org
Tue May 26 11:55:41 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 631d16eaaa88ab76feaa6c672ce4a4ca4bfcf14b
https://github.com/llvm/llvm-project/commit/631d16eaaa88ab76feaa6c672ce4a4ca4bfcf14b
Author: Ziqing Luo <ziqing_luo at apple.com>
Date: 2026-05-26 (Tue, 26 May 2026)
Changed paths:
M clang/include/clang/ScalableStaticAnalysisFramework/Analyses/PointerFlow/PointerFlow.h
M clang/include/clang/ScalableStaticAnalysisFramework/Analyses/PointerFlow/PointerFlowAnalysis.h
M clang/lib/ScalableStaticAnalysisFramework/Analyses/UnsafeBufferUsage/UnsafeBufferUsageAnalysis.cpp
M clang/unittests/ScalableStaticAnalysisFramework/WholeProgramAnalysis/UnsafeBufferReachableAnalysisTest.cpp
Log Message:
-----------
[SSAF][WPA] Bounds propagation graph is a supergraph of the pointer-flow graph (#198889)
Background: The whole-program UnsafeBufferReachableAnalysis propagates
bounds between pointers. It uses the pointer-flow graph extracted and
linked from translation units.
This commit patches the gap between the semantics of bounds propagation
and pointer-flow: the bounds propagation graph is a super graph of the
pointer-flow graph in that a pointer-flow graph edge `(src, i) -> (dst,
j)` is the projection of a finite set of bounds propagation graph edges
`{(src, i+d) -> (dst, j+d) | 0 <= d < UB}` for a small constant upper
bound UB. See the following example for the idea:
```
void f(int ***p, int **q) {
*p = q;
(**p)[5] = 0;
}
```
There is one edge for the static pointer assignment: '(p, 2) -> (q, 1)'.
In terms of bounds propagation, this assignment implies that if 'p' at
pointer level 2 requires bounds, 'q' at pointer level 1 must also have
them. Furthermore, this relationship propagates to deeper indirection
levels: if 'p' at level 3 requires bounds (due to '(**p)[5]'), so does
'q' at level 2.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list