diff --git a/src/main/java/com/code_intelligence/jazzer/api/Autofuzz.java b/src/main/java/com/code_intelligence/jazzer/api/Autofuzz.java index ae525c6c5..d55af3a21 100644 --- a/src/main/java/com/code_intelligence/jazzer/api/Autofuzz.java +++ b/src/main/java/com/code_intelligence/jazzer/api/Autofuzz.java @@ -157,7 +157,7 @@ private Autofuzz() {} * The {@link Throwable} is thrown unchecked. */ @SuppressWarnings("unchecked") - public static R autofuzz(FuzzedDataProvider data, Function1 func) { + public static R autofuzz(FuzzedDataProvider data, Function1 func) throws Throwable { try { return (R) AUTOFUZZ_FUNCTION_1.invoke(data, func); } catch (AutofuzzInvocationException e) { @@ -187,7 +187,7 @@ public static R autofuzz(FuzzedDataProvider data, Function1 func) * The {@link Throwable} is thrown unchecked. */ @SuppressWarnings("unchecked") - public static R autofuzz(FuzzedDataProvider data, Function2 func) { + public static R autofuzz(FuzzedDataProvider data, Function2 func) throws Throwable { try { return (R) AUTOFUZZ_FUNCTION_2.invoke(data, func); } catch (AutofuzzInvocationException e) { @@ -217,7 +217,7 @@ public static R autofuzz(FuzzedDataProvider data, Function2 R autofuzz(FuzzedDataProvider data, Function3 func) { + public static R autofuzz(FuzzedDataProvider data, Function3 func) throws Throwable { try { return (R) AUTOFUZZ_FUNCTION_3.invoke(data, func); } catch (AutofuzzInvocationException e) { @@ -248,7 +248,7 @@ public static R autofuzz(FuzzedDataProvider data, Function3 R autofuzz( - FuzzedDataProvider data, Function4 func) { + FuzzedDataProvider data, Function4 func) throws Throwable { try { return (R) AUTOFUZZ_FUNCTION_4.invoke(data, func); } catch (AutofuzzInvocationException e) { @@ -279,7 +279,7 @@ public static R autofuzz( */ @SuppressWarnings("unchecked") public static R autofuzz( - FuzzedDataProvider data, Function5 func) { + FuzzedDataProvider data, Function5 func) throws Throwable { try { return (R) AUTOFUZZ_FUNCTION_5.invoke(data, func); } catch (AutofuzzInvocationException e) { @@ -306,7 +306,7 @@ public static R autofuzz( * AutofuzzConstructionException} if autofuzz failed to construct the arguments for the call. * The {@link Throwable} is thrown unchecked. */ - public static void autofuzz(FuzzedDataProvider data, Consumer1 func) { + public static void autofuzz(FuzzedDataProvider data, Consumer1 func) throws Throwable { try { AUTOFUZZ_CONSUMER_1.invoke(data, func); } catch (AutofuzzInvocationException e) { @@ -331,7 +331,7 @@ public static void autofuzz(FuzzedDataProvider data, Consumer1 func) { * AutofuzzConstructionException} if autofuzz failed to construct the arguments for the call. * The {@link Throwable} is thrown unchecked. */ - public static void autofuzz(FuzzedDataProvider data, Consumer2 func) { + public static void autofuzz(FuzzedDataProvider data, Consumer2 func) throws Throwable { try { AUTOFUZZ_CONSUMER_2.invoke(data, func); } catch (AutofuzzInvocationException e) { @@ -356,7 +356,7 @@ public static void autofuzz(FuzzedDataProvider data, Consumer2 * AutofuzzConstructionException} if autofuzz failed to construct the arguments for the call. * The {@link Throwable} is thrown unchecked. */ - public static void autofuzz(FuzzedDataProvider data, Consumer3 func) { + public static void autofuzz(FuzzedDataProvider data, Consumer3 func) throws Throwable { try { AUTOFUZZ_CONSUMER_3.invoke(data, func); } catch (AutofuzzInvocationException e) { @@ -382,7 +382,7 @@ public static void autofuzz(FuzzedDataProvider data, Consumer3 void autofuzz( - FuzzedDataProvider data, Consumer4 func) { + FuzzedDataProvider data, Consumer4 func) throws Throwable { try { AUTOFUZZ_CONSUMER_4.invoke(data, func); } catch (AutofuzzInvocationException e) { @@ -408,7 +408,7 @@ public static void autofuzz( * The {@link Throwable} is thrown unchecked. */ public static void autofuzz( - FuzzedDataProvider data, Consumer5 func) { + FuzzedDataProvider data, Consumer5 func) throws Throwable { try { AUTOFUZZ_CONSUMER_5.invoke(data, func); } catch (AutofuzzInvocationException e) { diff --git a/src/main/java/com/code_intelligence/jazzer/api/MethodHook.java b/src/main/java/com/code_intelligence/jazzer/api/MethodHook.java index 0df33c20d..bb1a8a405 100644 --- a/src/main/java/com/code_intelligence/jazzer/api/MethodHook.java +++ b/src/main/java/com/code_intelligence/jazzer/api/MethodHook.java @@ -119,6 +119,8 @@ * reference a target method, no other types allowed. Attention must be paid to not * guide the Fuzzer in different directions via {@link Jazzer}'s {@code guideTowardsXY} * methods in the different hooks. + * + * */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD)