From 404fb48668e56a56fbb106ffb495b26462b7ffb2 Mon Sep 17 00:00:00 2001 From: "Markus F.X.J. Oberhumer" Date: Thu, 21 Aug 2025 00:21:15 +0200 Subject: [PATCH] CI updates --- .github/workflows/ci.yml | 24 +++++++++++++----------- misc/testsuite/mimic_ctest_sigsegv.sh | 2 +- src/p_mach.cpp | 2 ++ src/packmast.cpp | 2 +- src/stub/Makefile | 1 + 5 files changed, 18 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5927fd63..00a4261f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,8 +22,8 @@ env: UPX_DEBUG_TEST_FLOAT_DIVISION_BY_ZERO: 1 UPX_DEBUG_TEST_LIBC_QSORT: 1 ZSTD_CLEVEL: 17 - # 2025-05-21 - ZIG_DIST_VERSION: 0.14.1 + # 2025-08-19 + ZIG_DIST_VERSION: 0.15.1 jobs: job-rebuild-and-verify-stubs: @@ -102,7 +102,7 @@ jobs: - run: (sudo dmidecode | sed -n -e '/System Information/,/^$/p') || true - run: sudo dmidecode -q || true - run: sudo dmidecode || true - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: { submodules: true } - run: make build/extra/gcc/all - run: make build/extra/clang/all @@ -181,7 +181,7 @@ jobs: sudo apt-get install -y wine wine32:i386 wine64 ls -l /usr/bin/wine* mkdir -p -v ~/.wine && wineboot --init - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: { submodules: true } - name: Check out test suite run: git clone --depth=1 https://github.com/upx/upx-testsuite ../deps/upx-testsuite @@ -322,7 +322,7 @@ jobs: # TODO FIXME: UPX on macos-13+ is broken => disable run-packed for now macos-1[345]) echo "UPX_CONFIG_DISABLE_RUN_PACKED_TEST=ON" >> $GITHUB_ENV ;; esac - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: { submodules: true } - name: Check out test suite if: ${{ matrix.testsuite }} @@ -423,7 +423,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - run: git config --global core.autocrlf false - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: { submodules: true } - name: Check out test suite run: git clone --depth=1 https://github.com/upx/upx-testsuite ../deps/upx-testsuite @@ -502,7 +502,7 @@ jobs: B: release steps: - run: git config --global core.autocrlf false - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: { submodules: true } - name: Prepare sources and Check out test suite run: | @@ -635,7 +635,7 @@ jobs: git config --global --add safe.directory '*' # needed when running in a container mkdir -p ~/.parallel && : > ~/.parallel/$(echo 6305-4721 | tr 0-7 leticlwi) - run: (sudo dmidecode | sed -n -e '/System Information/,/^$/p') || true - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: { submodules: true } - name: ${{ format('Install Zig {0}', env.ZIG_DIST_VERSION) }} run: | @@ -655,7 +655,8 @@ jobs: ZIG_DIST_NAME=zig-linux-x86_64-${ZIG_DIST_VERSION} ZIG_DIST_NAME=zig-x86_64-linux-${ZIG_DIST_VERSION} #curl -sS -L -O https://ziglang.org/builds/${ZIG_DIST_NAME}.tar.xz - curl -sS -L -O https://ziglang.org/download/0.14.1/${ZIG_DIST_NAME}.tar.xz + #curl -sS -L -O https://ziglang.org/download/0.14.1/${ZIG_DIST_NAME}.tar.xz + curl -sS -L -O https://ziglang.org/download/0.15.1/${ZIG_DIST_NAME}.tar.xz ls -l ${ZIG_DIST_NAME}.tar.xz file ${ZIG_DIST_NAME}.tar.xz || true tar -xoJf ${ZIG_DIST_NAME}.tar.xz @@ -665,7 +666,7 @@ jobs: echo -n 'zig version: '; zig version # patch zig ls -la "$HOME" "$GITHUB_WORKSPACE" || true - #(cd ${ZIG_DIST_NAME} && patch --verbose -p1 -i "$GITHUB_WORKSPACE"/misc/patches/zig/0001-x.patch) + (cd ${ZIG_DIST_NAME} && patch --verbose -p1 -i "$GITHUB_WORKSPACE"/misc/patches/zig/0001-x.patch) # create wrapper scripts (needed for CMake) log= log='set -x\n' @@ -762,7 +763,8 @@ jobs: echo "===== parallel jobs: $jobs" parallel -kv --lb 'cd build/zig/{} && bash ../../../../misc/testsuite/mimic_ctest.sh' ::: $jobs - name: Mimic ctest tests with Valgrind - if: ${{ matrix.zig_target == 'x86_64-linux-musl' || contains(matrix.zig_target, 'x86_64-linux-gnu.2') }} + #if: ${{ matrix.zig_target == 'x86_64-linux-musl' || contains(matrix.zig_target, 'x86_64-linux-gnu.2') }} + if: false run: | export UPX_CONFIG_DISABLE_EXHAUSTIVE_TESTS=ON # valgrind is SLOW apk add coreutils valgrind diff --git a/misc/testsuite/mimic_ctest_sigsegv.sh b/misc/testsuite/mimic_ctest_sigsegv.sh index 8e04dc5c..da4743c9 100755 --- a/misc/testsuite/mimic_ctest_sigsegv.sh +++ b/misc/testsuite/mimic_ctest_sigsegv.sh @@ -40,7 +40,7 @@ elif [[ -n $CMAKE_CROSSCOMPILING_EMULATOR ]]; then true else upx_exe_runner=emu_gdb - : ${upx_run_packed_test_count:=100} + : ${upx_run_packed_test_count:=20} fi source "$argv0dir/mimic_ctest.sh" diff --git a/src/p_mach.cpp b/src/p_mach.cpp index 1ebbb592..a6c175b7 100644 --- a/src/p_mach.cpp +++ b/src/p_mach.cpp @@ -1418,6 +1418,7 @@ void PackMachBase::pack1(OutputFile *const fo, Filter &/*ft*/) // generate e unsigned const sz_threado = threado_size(); MemBuffer space(sz_threado); memset(space, 0, sz_threado); fo->write(space, sz_threado); + UNUSED(cmdsize); } else if (my_filetype == Mach_header::MH_DYLIB) { Mach_command const *ptr = (Mach_command const *)rawmseg; @@ -1449,6 +1450,7 @@ void PackMachBase::pack1(OutputFile *const fo, Filter &/*ft*/) // generate e } memset(&linkitem, 0, sizeof(linkitem)); fo->write(&linkitem, sizeof(linkitem)); + UNUSED(cmdsize); } sz_mach_headers = fo->getBytesWritten(); gap = secTEXT.offset - sz_mach_headers; diff --git a/src/packmast.cpp b/src/packmast.cpp index 8ae5501d..657f197c 100644 --- a/src/packmast.cpp +++ b/src/packmast.cpp @@ -56,7 +56,7 @@ #include "p_wince_arm.h" /************************************************************************* -// +// dispatch to a concrete subclass of class PackerBase; see work.cpp **************************************************************************/ PackMaster::PackMaster(InputFile *f, Options *o) noexcept : fi(f) { diff --git a/src/stub/Makefile b/src/stub/Makefile index 9e1670a2..59b6762d 100644 --- a/src/stub/Makefile +++ b/src/stub/Makefile @@ -550,6 +550,7 @@ amd64-win64.pe.h : tc_objdump_disasm_options = -M intel-mnemonic tc.amd64-win64.pe.gcc = amd64-linux-gcc-4.1.1 -m64 -nostdinc -DWINDOWS_BACK=1 -MMD -MT $@ tc.amd64-win64.pe.gcc += -fno-exceptions -fno-asynchronous-unwind-tables +tc.amd64-win64.pe.gcc += -mno-red-zone tc.amd64-win64.pe.gcc += -Wall -W -Wcast-align -Wcast-qual -Wstrict-prototypes -Wwrite-strings -Werror tc.amd64-win64.pe.objdump = multiarch-objdump-2.23.90