1
0
mirror of https://github.com/upx/upx.git synced 2025-08-11 22:52:30 +08:00

CI updates

This commit is contained in:
Markus F.X.J. Oberhumer
2025-07-25 03:07:51 +02:00
committed by John Reiser
parent 10b33ba911
commit a9c1848201
5 changed files with 15 additions and 10 deletions

View File

@ -99,6 +99,10 @@ jobs:
- run: uname -a; pwd; id; umask
- run: sudo apt-get update
- run: sudo apt-get install -y gdb parallel valgrind
- name: dmidecode
run: |
sudo apt-get install -y dmidecode
sudo dmidecode
- uses: actions/checkout@v4
with: { submodules: true }
- run: make build/extra/gcc/all
@ -161,6 +165,11 @@ jobs:
done
ls -l /etc/alternatives/*mingw* || true
sudo apt-get install -y libc6-dbg:i386 valgrind
- name: dmidecode
if: ${{ matrix.use_extra }}
run: |
sudo apt-get install -y dmidecode
sudo dmidecode
- name: Install Wine
if: ${{ matrix.use_extra && matrix.use_wine }}
run: |

View File

@ -205,8 +205,8 @@ if [[ $UPX_CONFIG_DISABLE_EXHAUSTIVE_TESTS != ON ]]; then
"${run_upx[@]}" -qq -d upx-packed-${s}${exe} ${fo} -o upx-unpacked-${s}${exe}
cmp -s upx-unpacked${exe} upx-unpacked-${s}${exe}
if [[ $UPX_CONFIG_DISABLE_RUN_PACKED_TEST != ON ]]; then
: ${upx_run_packed_test:=9}
for ((i = 0; i < $upx_run_packed_test; i++)); do
: ${upx_run_packed_test_count:=9}
for ((i = 0; i < $upx_run_packed_test_count; i++)); do
"${emu[@]}" ./upx-packed-${s}${exe} --version-short
done
fi

View File

@ -40,7 +40,7 @@ elif [[ -n $CMAKE_CROSSCOMPILING_EMULATOR ]]; then
true
else
upx_exe_runner=emu_gdb
: ${upx_run_packed_test:=100}
: ${upx_run_packed_test_count:=100}
fi
source "$argv0dir/mimic_ctest.sh"

View File

@ -1117,10 +1117,10 @@ void upx_compiler_sanity_check(void) noexcept {
static_assert(upx::compile_time::get_le24(d) == 0xfdfeff);
static_assert(upx::compile_time::get_le32(d) == 0xfcfdfeff);
static_assert(upx::compile_time::get_le64(d) == 0xf8f9fafbfcfdfeffULL);
const N_BELE_RTP::AbstractPolicy *bele;
assert_noexcept(upx_adler32(d, 4) == 0x09f003f7);
assert_noexcept(upx_adler32(d, 4, 0) == 0x09ec03f6);
assert_noexcept(upx_adler32(d, 4, 1) == 0x09f003f7);
const N_BELE_RTP::AbstractPolicy *bele;
bele = &N_BELE_RTP::be_policy;
assert_noexcept(get_be16(d) == 0xfffe);
assert_noexcept(bele->get16(d) == 0xfffe);

View File

@ -141,7 +141,7 @@ inline constexpr bool upx_is_integral_v = upx_is_integral<T>::value;
#define upx_fake_alignas_16 __attribute__((__aligned__(2))) // object file maximum 2 ???
#define upx_fake_alignas__(x) upx_fake_alignas_##x
#define alignas(x) upx_fake_alignas__(x)
#define upx_alignas_max upx_fake_alignas_4
#define upx_alignas_max upx_fake_alignas_2
#endif
#ifndef upx_alignas_max
#define upx_alignas_max alignas(std::max_align_t)
@ -197,11 +197,7 @@ struct alignas(1) upx_charptr_unit_type final { char hidden__; };
static_assert(sizeof(upx_charptr_unit_type) == 1);
// using the system off_t was a bad idea even back in 199x...
#if (__SIZEOF_INT128__ == 16) && 0
typedef upx_int128_t upx_off_t;
#else
typedef long long upx_off_t;
#endif
#undef off_t
#if 0
// TODO later cleanup: at some future point we can do this:
@ -234,7 +230,7 @@ typedef long long upx_off_t;
#define very_likely __acc_very_likely
#define very_unlikely __acc_very_unlikely
// cosmetic: explicitly annotate some functions which may throw exceptions
// cosmetic: explicitly annotate some functions which may throw exceptions;
// note that noexcept(false) is the default for all C++ functions anyway
#define may_throw noexcept(false)