From 2e39c924d53a88ec41820db672d6e87fb5624c92 Mon Sep 17 00:00:00 2001 From: "Markus F.X.J. Oberhumer" Date: Wed, 29 Oct 2025 10:03:11 +0100 Subject: [PATCH] CI updates --- .github/workflows/ci.yml | 12 ++++++------ src/check/dt_check.cpp | 2 +- src/pefile.cpp | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e411ff4d..8e86fe37 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -117,7 +117,7 @@ jobs: (cd tmp/artifact && tar --sort=name --zstd -cf "$N.tar.zst" "$N" && rm -rf "./$N" && ls -la && zstd -tq "$N.tar.zst") echo "artifact_name=$N" >> $GITHUB_ENV - name: ${{ format('Upload artifact {0}', env.artifact_name) }} - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 with: { name: '${{ env.artifact_name }}', path: tmp/artifact } - name: Run install tests run: | @@ -222,7 +222,7 @@ jobs: (cd tmp/artifact && tar --sort=name --zstd -cf "$N.tar.zst" "$N" && rm -rf "./$N" && ls -la && zstd -tq "$N.tar.zst") echo "artifact_name=$N" >> $GITHUB_ENV - name: ${{ format('Upload artifact {0}', env.artifact_name) }} - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 with: { name: '${{ env.artifact_name }}', path: tmp/artifact } - name: Run install tests run: | @@ -364,7 +364,7 @@ jobs: (cd tmp/artifact && gtar --sort=name --zstd -cf "$N.tar.zst" "$N" && rm -rf "./$N" && ls -la && zstd -tq "$N.tar.zst") echo "artifact_name=$N" >> $GITHUB_ENV - name: ${{ format('Upload artifact {0}', env.artifact_name) }} - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 with: { name: '${{ env.artifact_name }}', path: tmp/artifact } - name: Run install tests run: | @@ -468,7 +468,7 @@ jobs: (cd tmp/artifact && tar --sort=name --gzip -cf "$N.tar.gz" "$N" && rm -rf "./$N" && ls -la && gzip -tq "$N.tar.gz") echo "artifact_name=$N" >> $GITHUB_ENV - name: ${{ format('Upload artifact {0}', env.artifact_name) }} - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 with: { name: '${{ env.artifact_name }}', path: tmp/artifact } - name: Run ctest tests run: | @@ -563,7 +563,7 @@ jobs: (cd tmp/artifact && tar --sort=name --gzip -cf "$N.tar.gz" "$N" && rm -rf "./$N" && ls -la && gzip -tq "$N.tar.gz") echo "artifact_name=$N" >> $GITHUB_ENV - name: ${{ format('Upload artifact {0}', env.artifact_name) }} - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 with: { name: '${{ env.artifact_name }}', path: tmp/artifact } - name: Mimic ctest tests if: ${{ matrix.vsarch != 'amd64_arm64' }} @@ -733,7 +733,7 @@ jobs: (cd tmp/artifact && tar --sort=name --zstd -cf "$N.tar.zst" "$N" && rm -rf "./$N" && ls -la && zstd -tq "$N.tar.zst") echo "artifact_name=$N" >> $GITHUB_ENV - name: ${{ format('Upload artifact {0}', env.artifact_name) }} - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 with: { name: '${{ env.artifact_name }}', path: tmp/artifact } - name: Run install tests if: ${{ contains(matrix.zig_target, '-linux') }} diff --git a/src/check/dt_check.cpp b/src/check/dt_check.cpp index 935f6d67..59a20a06 100644 --- a/src/check/dt_check.cpp +++ b/src/check/dt_check.cpp @@ -1104,11 +1104,11 @@ void upx_compiler_sanity_check(void) noexcept { alignas(16) static constexpr const byte dd[32] = { 0, 0, 0, 0, 0, 0, 0, 0xff, 0xfe, 0xfd, 0xfc, 0xfb, 0xfa, 0xf9, 0xf8, 0, 0, 0, 0, 0x7f, 0x7e, 0x7d, 0x7c, 0x7b, 0x7a, 0x79, 0x78, 0, 0, 0, 0, 0}; - constexpr const byte *d = dd + 7; #if !defined(upx_fake_alignas_16) assert_noexcept(ptr_is_aligned<16>(dd)); assert_noexcept(ptr_is_aligned(dd, 16)); #endif + constexpr const byte *d = dd + 7; static_assert(upx::compile_time::get_be16(d) == 0xfffe); static_assert(upx::compile_time::get_be24(d) == 0xfffefd); static_assert(upx::compile_time::get_be32(d) == 0xfffefdfc); diff --git a/src/pefile.cpp b/src/pefile.cpp index 5147a149..f38e12d8 100644 --- a/src/pefile.cpp +++ b/src/pefile.cpp @@ -1497,7 +1497,7 @@ void PeFile::processTls2(Reloc *const rel, const Interval *const iv, unsigned ne otls + (iv->ivarr[ic].start - (tlsp->datastart - imagebase) + sizeof(tls))); LEXX *const p = (LEXX *) raw_bytes(pp, sizeof(LEXX)); cb_value_t kc = *p; - if (kc < tlsp->dataend && kc >= tlsp->datastart) { + if (kc >= tlsp->datastart && kc < tlsp->dataend) { // add a relocation entry referring to an address inside of the original tls data area // - as the new tls area is moved, the referred address have to be also adjusted kc += newaddr + sizeof(tls) - tlsp->datastart; @@ -1507,7 +1507,7 @@ void PeFile::processTls2(Reloc *const rel, const Interval *const iv, unsigned ne // add a relocation entry referring to an address outside of the original tls data area // by adding the difference of the new tlsdatastart and the old tlsdatastart to // the address of the original relocation record - unsigned const a = + const unsigned a = iv->ivarr[ic].start + (newaddr + sizeof(tls)) - (tlsp->datastart - imagebase); // Must not overwrite compressed data if (a < newaddr && !opt->win32_pe.strip_relocs)