File tree Expand file tree Collapse file tree 4 files changed +40
-0
lines changed
src/main/java/com/code_intelligence/jazzer/mutation Expand file tree Collapse file tree 4 files changed +40
-0
lines changed Original file line number Diff line number Diff line change 3030import com .code_intelligence .jazzer .mutation .combinator .MutatorCombinators ;
3131import com .code_intelligence .jazzer .mutation .engine .SeededPseudoRandom ;
3232import com .code_intelligence .jazzer .mutation .mutator .Mutators ;
33+ import com .code_intelligence .jazzer .mutation .runtime .MutationRuntime ;
3334import com .code_intelligence .jazzer .mutation .support .Preconditions ;
3435import com .code_intelligence .jazzer .utils .Log ;
3536import java .io .ByteArrayInputStream ;
@@ -97,6 +98,8 @@ public static Optional<ArgumentsMutator> forMethod(
9798 Log .error (validationError .getMessage ());
9899 throw validationError ;
99100 }
101+ MutationRuntime .fuzzTestMethod = method ;
102+ DictionaryProvider [] typeDictionaries = method .getAnnotationsByType (DictionaryProvider .class );
100103 return toArrayOrEmpty (
101104 stream (method .getAnnotatedParameterTypes ())
102105 .map (
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ java_library(
1111 "//src/main/java/com/code_intelligence/jazzer/mutation/combinator" ,
1212 "//src/main/java/com/code_intelligence/jazzer/mutation/engine" ,
1313 "//src/main/java/com/code_intelligence/jazzer/mutation/mutator" ,
14+ "//src/main/java/com/code_intelligence/jazzer/mutation/runtime" ,
1415 "//src/main/java/com/code_intelligence/jazzer/mutation/support" ,
1516 "//src/main/java/com/code_intelligence/jazzer/utils:log" ,
1617 ],
Original file line number Diff line number Diff line change 1+ java_library (
2+ name = "runtime" ,
3+ srcs = glob (["*.java" ]),
4+ visibility = [
5+ "//selffuzz/src/test/java/com/code_intelligence/selffuzz/mutation/mutator/lang:__pkg__" ,
6+ "//src/main/java/com/code_intelligence/jazzer/mutation:__pkg__" ,
7+ "//src/main/java/com/code_intelligence/jazzer/mutation:__subpackages__" ,
8+ "//src/test/java/com/code_intelligence/jazzer/mutation:__pkg__" ,
9+ "//src/test/java/com/code_intelligence/jazzer/mutation:__subpackages__" ,
10+ ],
11+ )
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2024 Code Intelligence GmbH
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * http://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+
17+ package com .code_intelligence .jazzer .mutation .runtime ;
18+
19+ import java .lang .reflect .Method ;
20+
21+ /** Runtime information to be used by mutators. */
22+ public class MutationRuntime {
23+ /** The fuzz test method currently being executed. */
24+ public static Method fuzzTestMethod ;
25+ }
You can’t perform that action at this time.
0 commit comments