We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Arrays.copyOf()
1 parent 86ef02d commit 39da71eCopy full SHA for 39da71e
src/main/java/pascal/taie/analysis/pta/plugin/natives/ArrayModel.java
@@ -57,6 +57,13 @@ public static class AnalysisModel extends AnalysisModelPlugin {
57
super(solver);
58
}
59
60
+ @Override
61
+ public void onStart() {
62
+ // Solver should ignore `Arrays.copyOf()` to avoid spurious flows merging from other
63
+ // callsites, as in the `IRModelPlugin.onStart()`.
64
+ handlers.keySet().forEach(solver::addIgnoredMethod);
65
+ }
66
+
67
@InvokeHandler(signature = "<java.util.Arrays: java.lang.Object[] copyOf(java.lang.Object[],int)>", argIndexes = {0})
68
public void arraysCopyOf(Context context, Invoke invoke, PointsToSet from) {
69
JMethod container = invoke.getContainer();
0 commit comments