Skip to content

Commit e1eb88f

Browse files
committed
Fix NPE in Zipper-e pre-analysis
Reported-by: jpwang <jpwang@smail.nju.edu.cn>
1 parent 0f4bcf4 commit e1eb88f

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
- Pointer analysis
77
- Add special handling for zero-length arrays to enhance PTA precision.
88

9+
### Fixes
10+
- Fix NPE in Zipper-e pre-analysis.
11+
912
## [0.5.1] - 2024-12-31
1013

1114
### New Features

src/main/java/pascal/taie/analysis/pta/toolkit/zipper/Zipper.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,10 @@ private Set<JMethod> getPrecisionCriticalMethods(PrecisionFlowGraph pfg) {
186186
if (isExpress) {
187187
int accPts = 0;
188188
for (JMethod m : pcms) {
189-
accPts += methodPts.get(m).intValue();
189+
MutableInt mPtsSize = methodPts.get(m);
190+
if (mPtsSize != null) {
191+
accPts += mPtsSize.intValue();
192+
}
190193
}
191194
if (accPts > pcmThreshold) {
192195
// clear precision-critical method group whose accumulative

0 commit comments

Comments
 (0)