From 4f0a0b9a947f45eb87f79b457c50eb6c9fe6a778 Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Mon, 25 Sep 2017 08:15:51 -0500 Subject: [PATCH] [libpng16] Build fuzzer with "-O0" to defeat optimizer removing "dead" code --- contrib/oss-fuzz/build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/oss-fuzz/build.sh b/contrib/oss-fuzz/build.sh index 7b8150f4c..dad704f17 100755 --- a/contrib/oss-fuzz/build.sh +++ b/contrib/oss-fuzz/build.sh @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. # -# Last changed in libpng 1.6.32 [August 24, 2017] +# Last changed in libpng 1.6.33 [(PENDING RELEASE)] # # Revisions by Glenn Randers-Pehson, 2017: # 1. Build only the library, not the tools (changed "make -j$(nproc) all" to @@ -37,7 +37,7 @@ make -j$(nproc) clean make -j$(nproc) libpng16.la # build libpng_read_fuzzer. -$CXX $CXXFLAGS -std=c++11 -I. \ +$CXX $CXXFLAGS -O0 -std=c++11 -I. \ $SRC/libpng/contrib/oss-fuzz/libpng_read_fuzzer.cc \ -o $OUT/libpng_read_fuzzer \ -lFuzzingEngine .libs/libpng16.a -lz