From 859f19f74f7d583f3132875a34489601455bff48 Mon Sep 17 00:00:00 2001 From: "yguyon@google.com" Date: Fri, 24 Feb 2023 09:14:41 +0000 Subject: [PATCH 1/3] Reduce libwebp advanced_api_fuzzer threshold To avoid timeouts. Change-Id: I8909661479cdbcb940bb44c6f9130906cab3f271 --- tests/fuzzer/advanced_api_fuzzer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/fuzzer/advanced_api_fuzzer.c b/tests/fuzzer/advanced_api_fuzzer.c index 1378d0bc..e861db76 100644 --- a/tests/fuzzer/advanced_api_fuzzer.c +++ b/tests/fuzzer/advanced_api_fuzzer.c @@ -85,7 +85,7 @@ int LLVMFuzzerTestOneInput(const uint8_t* const data, size_t size) { scaled_height != config.input.height) { // Using the WebPRescalerImport internally can significantly slow // down the execution. Avoid timeouts due to that. - fuzz_px_limit /= 2; + fuzz_px_limit /= 3; } // A big output canvas can lead to out-of-memory and timeout issues, // but a big internal working buffer can too. From 89edfdd1e982fa146308b73cb5f02ac8dc411b62 Mon Sep 17 00:00:00 2001 From: "yguyon@google.com" Date: Wed, 8 Mar 2023 07:50:19 +0000 Subject: [PATCH 2/3] Skip slow scaling in libwebp advanced_api_fuzzer Change-Id: Ic57e7f8418afec42f042197a401aaf4cc047b23f --- tests/fuzzer/advanced_api_fuzzer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/fuzzer/advanced_api_fuzzer.c b/tests/fuzzer/advanced_api_fuzzer.c index e861db76..de1149a9 100644 --- a/tests/fuzzer/advanced_api_fuzzer.c +++ b/tests/fuzzer/advanced_api_fuzzer.c @@ -85,7 +85,7 @@ int LLVMFuzzerTestOneInput(const uint8_t* const data, size_t size) { scaled_height != config.input.height) { // Using the WebPRescalerImport internally can significantly slow // down the execution. Avoid timeouts due to that. - fuzz_px_limit /= 3; + fuzz_px_limit /= 8; } // A big output canvas can lead to out-of-memory and timeout issues, // but a big internal working buffer can too. From cbf624b56167f99ec4deb86f5ea6af988984d221 Mon Sep 17 00:00:00 2001 From: James Zern Date: Fri, 24 Mar 2023 16:57:57 +0000 Subject: [PATCH 3/3] advanced_api_fuzzer: reduce scaling limit avoids another timeout while fuzzing with ASan Change-Id: Ibd89e56bf936aeea040cd4c47ccae20960417ac0 --- tests/fuzzer/advanced_api_fuzzer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/fuzzer/advanced_api_fuzzer.c b/tests/fuzzer/advanced_api_fuzzer.c index de1149a9..e4280a09 100644 --- a/tests/fuzzer/advanced_api_fuzzer.c +++ b/tests/fuzzer/advanced_api_fuzzer.c @@ -85,7 +85,7 @@ int LLVMFuzzerTestOneInput(const uint8_t* const data, size_t size) { scaled_height != config.input.height) { // Using the WebPRescalerImport internally can significantly slow // down the execution. Avoid timeouts due to that. - fuzz_px_limit /= 8; + fuzz_px_limit /= 9; } // A big output canvas can lead to out-of-memory and timeout issues, // but a big internal working buffer can too.