GraphicsMagick: 2 new changesets
GraphicsMagick Commits <[email protected]> Sun, 16 Feb 2025 16:19:38 -0600
| Newsgroups | gmane.comp.video.graphicsmagick.cvs |
|---|---|
| Message-ID | <mailman.54100.1739744386.1470.graphicsmagick-commit@lists.sourceforge.net> |
changeset 502958ac63e9 in /hg/GraphicsMagick
details: http://hg.GraphicsMagick.org/hg/GraphicsMagick?cmd=changeset;node=502958ac63e9
summary: OSS-Fuzz build notes update and zlib build fix
changeset b07fe7ec07ae in /hg/GraphicsMagick
details: http://hg.GraphicsMagick.org/hg/GraphicsMagick?cmd=changeset;node=b07fe7ec07ae
summary: fuzzing/oss-fuzz-build.sh: Build zlib outside of source tree. Libzip mysteriously needs -DBUILD_TOOLS=ON to succeed.
diffstat:
fuzzing/README.txt | 22 +++++++++++-----------
fuzzing/oss-fuzz-build.sh | 30 +++++++++++++++++-------------
2 files changed, 28 insertions(+), 24 deletions(-)
diffs (124 lines):
diff -r 3f193f5aefd8 -r b07fe7ec07ae fuzzing/README.txt
--- a/fuzzing/README.txt Fri Feb 14 11:14:05 2025 -0600
+++ b/fuzzing/README.txt Sun Feb 16 16:19:14 2025 -0600
@@ -37,7 +37,7 @@
Pull the latest Docker images::
- $ python infra/helper.py pull_images
+ $ python3 infra/helper.py pull_images
Optionally remove the existing build directory (in git checkout):
@@ -49,39 +49,39 @@
Build the project image::
- python infra/helper.py build_image graphicsmagick
+ python3 infra/helper.py build_image graphicsmagick
Build project fuzzer target::
- python infra/helper.py build_fuzzers --sanitizer <address/memory/undefined> \
+ python3 infra/helper.py build_fuzzers --sanitizer <address/memory/undefined> \
--architecture <x86_64/i386> graphicsmagick
- python infra/helper.py build_fuzzers --sanitizer address --architecture x86_64 graphicsmagick
+ python3 infra/helper.py build_fuzzers --sanitizer address --architecture x86_64 graphicsmagick
Reproduce using local source checkout (mount local sources into the running container)::
- python infra/helper.py build_fuzzers \
+ python3 infra/helper.py build_fuzzers \
--sanitizer <address/memory/undefined> graphicsmagick <source_path>
- python infra/helper.py build_fuzzers --sanitizer address --architecture x86_64 graphicsmagick <source_path>
- python infra/helper.py reproduce graphicsmagick <fuzz_target_name> <testcase_path>
+ python3 infra/helper.py build_fuzzers --sanitizer address --architecture x86_64 graphicsmagick <source_path>
+ python3 infra/helper.py reproduce graphicsmagick <fuzz_target_name> <testcase_path>
Reproducing bugs::
- $ python infra/helper.py reproduce graphicsmagick <fuzz_target_name> <testcase_path>
+ $ python3 infra/helper.py reproduce graphicsmagick <fuzz_target_name> <testcase_path>
Check the build (this can take very long!)::
- python infra/helper.py build_fuzzers --sanitizer <address/memory/undefined> \
+ python3 infra/helper.py build_fuzzers --sanitizer <address/memory/undefined> \
--engine <libfuzzer/afl/honggfuzz/centipede> --architecture <x86_64/i386> graphicsmagick
- python infra/helper.py check_build --sanitizer <address/memory/undefined> \
+ python3 infra/helper.py check_build --sanitizer <address/memory/undefined> \
--engine <libfuzzer/afl/honggfuzz/centipede> --architecture <x86_64/i386> graphicsmagick \
<fuzz_target_name>
Get a shell into the container and compile::
- python infra/helper.py shell --sanitizer address --architecture x86_64 graphicsmagick
+ python3 infra/helper.py shell --sanitizer address --architecture x86_64 graphicsmagick
compile 2>&1 | tee build.log
Copy fuzzing build script into running container (given simultaneous shell session)::
diff -r 3f193f5aefd8 -r b07fe7ec07ae fuzzing/oss-fuzz-build.sh
--- a/fuzzing/oss-fuzz-build.sh Fri Feb 14 11:14:05 2025 -0600
+++ b/fuzzing/oss-fuzz-build.sh Sun Feb 16 16:19:14 2025 -0600
@@ -65,6 +65,7 @@
enable_x265=true
enable_xml=false
enable_xz=true
+enable_zlib=true
enable_zstd=true
export PKG_CONFIG_PATH="$WORK/lib/pkgconfig"
@@ -98,14 +99,21 @@
# build zlib
# PKG_CONFIG_PATH=/work/lib/pkgconfig:/usr/lib/pkgconfig pkg-config --static zlib --libs
# -L/work/lib -lz
-printf "=== Building zlib...\n"
-pushd "$SRC/zlib"
-./configure \
- --static \
- --prefix="$WORK"
-make -j$(nproc) CFLAGS="$CFLAGS -fPIC"
-make install
-popd
+if $enable_zlib
+then
+ printf "=== Building zlib...\n"
+ ZLIB_SRC="${SRC}/zlib"
+ ZLIB_BUILD="${SRC}/zlib_build"
+ rm -rf "${ZLIB_BUILD}"
+ mkdir -p "${ZLIB_BUILD}"
+ pushd "${ZLIB_BUILD}"
+ ${ZLIB_SRC}/configure \
+ --static \
+ --prefix="$WORK"
+ make -j$(nproc) CFLAGS="$CFLAGS -fPIC"
+ make install
+ popd
+fi
# build xz
# PKG_CONFIG_PATH=/work/lib/pkgconfig:/usr/lib/pkgconfig pkg-config --static liblzma --libs
@@ -680,10 +688,7 @@
pushd ${LIBZIP_BUILD}
cmake \
-DBUILD_SHARED_LIBS=off \
- -DBUILD_TESTING=off \
-DCMAKE_BUILD_TYPE=Debug \
- -DCMAKE_CXX_COMPILER=$CXX \
- -DCMAKE_CXX_FLAGS="$CXXFLAGS" \
-DCMAKE_C_COMPILER=$CC \
-DCMAKE_C_FLAGS="$CFLAGS -fPIC" \
-DCMAKE_INSTALL_PREFIX=$WORK \
@@ -692,8 +697,7 @@
-DBUILD_EXAMPLES=OFF \
-DBUILD_OSSFUZZ=OFF \
-DBUILD_REGRESS=OFF \
- -DBUILD_TOOLS=OFF \
- -DBUILD_TOOLS=OFF \
+ -DBUILD_TOOLS=ON \
-DENABLE_GNUTLS=OFF \
-DENABLE_MBEDTLS=OFF \
-DENABLE_OPENSSL=OFF \