-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Patch: jacoco LabelFlowAnalyzer should ignore jazzer data flow trace …
- Loading branch information
Showing
2 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
third_party/jacoco-skip-instrumentations-in-label-flow-analyzer.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// SPDX-License-Identifier: EPL-2.0 and Apache-2.0 | ||
// These patches apply to JaCoCo (https://github.com/jacoco/jacoco) and are hereby made available under the terms of the | ||
// Eclipse Public License 2.0 available at: | ||
// http://www.eclipse.org/legal/epl-2.0 | ||
diff --git org.jacoco.core/src/org/jacoco/core/internal/flow/LabelFlowAnalyzer.java org.jacoco.core/src/org/jacoco/core/internal/flow/LabelFlowAnalyzer.java | ||
index da70c14..411e317 100644 | ||
--- org.jacoco.core/src/org/jacoco/core/internal/flow/LabelFlowAnalyzer.java | ||
+++ org.jacoco.core/src/org/jacoco/core/internal/flow/LabelFlowAnalyzer.java | ||
@@ -183,6 +183,36 @@ public final class LabelFlowAnalyzer extends MethodVisitor { | ||
@Override | ||
public void visitMethodInsn(final int opcode, final String owner, | ||
final String name, final String desc, final boolean itf) { | ||
+ if (opcode == Opcodes.INVOKESTATIC) { | ||
+ if ("traceMemcmp".equals(name) && "([B[BII)V".equals(desc)) | ||
+ return; | ||
+ if ("traceStrcmp".equals(name) && "(Ljava/lang/String;Ljava/lang/String;II)V".equals(desc)) | ||
+ return; | ||
+ if ("traceStrstr".equals(name) && "(Ljava/lang/String;Ljava/lang/String;I)V".equals(desc)) | ||
+ return; | ||
+ if ("traceReflectiveCall".equals(name) && "(Ljava/lang/reflect/Executable;I)V".equals(desc)) | ||
+ return; | ||
+ if ("traceCmpLongWrapper".equals(name) && "(JJI)I".equals(desc)) | ||
+ return; | ||
+ if ("traceCmpInt".equals(name) && "(III)V".equals(desc)) | ||
+ return; | ||
+ if ("traceConstCmpInt".equals(name) && "(III)V".equals(desc)) | ||
+ return; | ||
+ if ("traceCmpLong".equals(name) && "(JJI)V".equals(desc)) | ||
+ return; | ||
+ if ("traceSwitch".equals(name) && "(J[JI)V".equals(desc)) | ||
+ return; | ||
+ if ("traceDivInt".equals(name) && "(II)V".equals(desc)) | ||
+ return; | ||
+ if ("traceDivLong".equals(name) && "(JI)V".equals(desc)) | ||
+ return; | ||
+ if ("traceDivGep".equals(name) && "(JI)V".equals(desc)) | ||
+ return; | ||
+ if ("tracePcIndir".equals(name) && "(II)V".equals(desc)) | ||
+ return; | ||
+ if ("traceStrstr0".equals(name) && "([BI)V".equals(desc)) | ||
+ return; | ||
+ } | ||
successor = true; | ||
first = false; | ||
markMethodInvocationLine(); | ||
|