CI updates
This commit is contained in:
@@ -166,13 +166,13 @@ jobs:
|
|||||||
echo "===== parallel jobs: $jobs"
|
echo "===== parallel jobs: $jobs"
|
||||||
parallel -kv --lb 'cd build/extra/{} && bash ../../../../misc/testsuite/mimic_ctest.sh' ::: $jobs
|
parallel -kv --lb 'cd build/extra/{} && bash ../../../../misc/testsuite/mimic_ctest.sh' ::: $jobs
|
||||||
fi
|
fi
|
||||||
- name: Run file system test suite
|
- name: Run file system tests
|
||||||
run: |
|
run: |
|
||||||
jobs="gcc/debug gcc/release clang/debug clang/release"
|
jobs="gcc/debug gcc/release clang/debug clang/release"
|
||||||
test "${{ matrix.use_extra }}" = "true" && jobs="$jobs gcc-m32/debug gcc-m32/release"
|
test "${{ matrix.use_extra }}" = "true" && jobs="$jobs gcc-m32/debug gcc-m32/release"
|
||||||
echo "===== parallel jobs: $jobs"
|
echo "===== parallel jobs: $jobs"
|
||||||
parallel -kv --lb 'cd build/extra/{} && bash ../../../../misc/testsuite/test_symlinks.sh' ::: $jobs
|
parallel -kv --lb 'cd build/extra/{} && bash ../../../../misc/testsuite/test_symlinks.sh' ::: $jobs
|
||||||
- name: Run file system test suite with Valgrind
|
- name: Run file system tests with Valgrind
|
||||||
if: false # note: valgrind is SLOW
|
if: false # note: valgrind is SLOW
|
||||||
run: |
|
run: |
|
||||||
if command -v valgrind >/dev/null; then
|
if command -v valgrind >/dev/null; then
|
||||||
@@ -237,6 +237,7 @@ jobs:
|
|||||||
- name: Check out test suite
|
- name: Check out test suite
|
||||||
if: ${{ matrix.testsuite }}
|
if: ${{ matrix.testsuite }}
|
||||||
run: git clone --depth=1 https://github.com/upx/upx-testsuite ../deps/upx-testsuite
|
run: git clone --depth=1 https://github.com/upx/upx-testsuite ../deps/upx-testsuite
|
||||||
|
- run: set -x; xcode-select -p || true; xcodebuild -version || true
|
||||||
- run: set -x; clang --version; clang++ --version
|
- run: set -x; clang --version; clang++ --version
|
||||||
- run: clang -E -x c -dM /dev/null # list predefined macros for C
|
- run: clang -E -x c -dM /dev/null # list predefined macros for C
|
||||||
- run: clang++ -E -x c++ -dM /dev/null # list predefined macros for C++
|
- run: clang++ -E -x c++ -dM /dev/null # list predefined macros for C++
|
||||||
@@ -283,7 +284,7 @@ jobs:
|
|||||||
test -n "${{ matrix.gcc }}" && jobs="$jobs gcc/debug gcc/release"
|
test -n "${{ matrix.gcc }}" && jobs="$jobs gcc/debug gcc/release"
|
||||||
echo "===== parallel jobs: $jobs"
|
echo "===== parallel jobs: $jobs"
|
||||||
parallel -kv --lb 'cd build/extra/{} && bash ../../../../misc/testsuite/mimic_ctest.sh' ::: $jobs
|
parallel -kv --lb 'cd build/extra/{} && bash ../../../../misc/testsuite/mimic_ctest.sh' ::: $jobs
|
||||||
- name: Run file system test suite
|
- name: Run file system tests
|
||||||
if: ${{ matrix.testsuite }} # for coreutils readlink
|
if: ${{ matrix.testsuite }} # for coreutils readlink
|
||||||
run: |
|
run: |
|
||||||
export PATH="$HOMEBREW_PREFIX/opt/coreutils/libexec/gnubin:$PATH"
|
export PATH="$HOMEBREW_PREFIX/opt/coreutils/libexec/gnubin:$PATH"
|
||||||
@@ -615,7 +616,7 @@ jobs:
|
|||||||
jobs="${ZIG_TARGET}${ZIG_PIC}/debug ${ZIG_TARGET}${ZIG_PIC}/release"
|
jobs="${ZIG_TARGET}${ZIG_PIC}/debug ${ZIG_TARGET}${ZIG_PIC}/release"
|
||||||
echo "===== parallel jobs: $jobs"
|
echo "===== parallel jobs: $jobs"
|
||||||
parallel -kv --lb 'cd build/zig/{} && bash ../../../../misc/testsuite/mimic_ctest.sh' ::: $jobs
|
parallel -kv --lb 'cd build/zig/{} && bash ../../../../misc/testsuite/mimic_ctest.sh' ::: $jobs
|
||||||
- name: Run file system test suite
|
- name: Run file system tests
|
||||||
if: ${{ matrix.zig_target == 'i386-linux-musl' || matrix.zig_target == 'x86_64-linux-musl' || matrix.zig_target == 'x86_64-linux-gnu.2.3.4' }}
|
if: ${{ matrix.zig_target == 'i386-linux-musl' || matrix.zig_target == 'x86_64-linux-musl' || matrix.zig_target == 'x86_64-linux-gnu.2.3.4' }}
|
||||||
run: |
|
run: |
|
||||||
apk add coreutils sudo
|
apk add coreutils sudo
|
||||||
|
|||||||
+3
-3
@@ -49,7 +49,7 @@
|
|||||||
|
|
||||||
#if defined(BELE_RTP)
|
#if defined(BELE_RTP)
|
||||||
struct AbstractPolicy {
|
struct AbstractPolicy {
|
||||||
explicit inline AbstractPolicy() noexcept {}
|
explicit inline AbstractPolicy() noexcept = default;
|
||||||
virtual inline ~AbstractPolicy() noexcept {}
|
virtual inline ~AbstractPolicy() noexcept {}
|
||||||
V bool isBE() C = 0;
|
V bool isBE() C = 0;
|
||||||
V bool isLE() C = 0;
|
V bool isLE() C = 0;
|
||||||
@@ -97,7 +97,7 @@ struct BEPolicy final
|
|||||||
: public AbstractPolicy
|
: public AbstractPolicy
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
explicit inline BEPolicy() noexcept {}
|
explicit inline BEPolicy() noexcept = default;
|
||||||
#if defined(BELE_CTP)
|
#if defined(BELE_CTP)
|
||||||
typedef N_BELE_RTP::BEPolicy RTP_Policy;
|
typedef N_BELE_RTP::BEPolicy RTP_Policy;
|
||||||
#elif defined(BELE_RTP)
|
#elif defined(BELE_RTP)
|
||||||
@@ -156,7 +156,7 @@ struct LEPolicy final
|
|||||||
: public AbstractPolicy
|
: public AbstractPolicy
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
explicit inline LEPolicy() noexcept {}
|
explicit inline LEPolicy() noexcept = default;
|
||||||
#if defined(BELE_CTP)
|
#if defined(BELE_CTP)
|
||||||
typedef N_BELE_RTP::LEPolicy RTP_Policy;
|
typedef N_BELE_RTP::LEPolicy RTP_Policy;
|
||||||
#elif defined(BELE_RTP)
|
#elif defined(BELE_RTP)
|
||||||
|
|||||||
@@ -59,6 +59,10 @@
|
|||||||
// warning: comparison with NaN always evaluates to false in fast floating point modes
|
// warning: comparison with NaN always evaluates to false in fast floating point modes
|
||||||
#pragma clang diagnostic ignored "-Wtautological-constant-compare"
|
#pragma clang diagnostic ignored "-Wtautological-constant-compare"
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(__FAST_MATH__) && defined(__clang__) && (__clang_major__ + 0 >= 18)
|
||||||
|
// warning: use of NaN is undefined behavior due to the currently enabled floating-point options
|
||||||
|
#pragma clang diagnostic ignored "-Wnan-infinity-disabled"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <doctest/doctest/parts/doctest.cpp>
|
#include <doctest/doctest/parts/doctest.cpp>
|
||||||
|
|
||||||
|
|||||||
+4
-16
@@ -1,4 +1,4 @@
|
|||||||
/* conf.h --
|
/* conf.h -- primary configuration
|
||||||
|
|
||||||
This file is part of the UPX executable compressor.
|
This file is part of the UPX executable compressor.
|
||||||
|
|
||||||
@@ -32,6 +32,7 @@
|
|||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
#include "util/system_headers.h"
|
#include "util/system_headers.h"
|
||||||
|
#include "util/system_undefs.h"
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
|
|
||||||
#if !defined(__has_attribute)
|
#if !defined(__has_attribute)
|
||||||
@@ -47,6 +48,7 @@
|
|||||||
// reserve name "upx" for namespace
|
// reserve name "upx" for namespace
|
||||||
namespace upx {}
|
namespace upx {}
|
||||||
|
|
||||||
|
// check compiler core
|
||||||
static_assert(CHAR_BIT == 8);
|
static_assert(CHAR_BIT == 8);
|
||||||
static_assert(sizeof(short) == 2);
|
static_assert(sizeof(short) == 2);
|
||||||
static_assert(sizeof(int) == 4);
|
static_assert(sizeof(int) == 4);
|
||||||
@@ -58,7 +60,7 @@ static_assert((1u << 31) << 1 == 0);
|
|||||||
static_assert(((int) (1u << 31)) >> 31 == -1); // arithmetic right shift
|
static_assert(((int) (1u << 31)) >> 31 == -1); // arithmetic right shift
|
||||||
static_assert((-1) >> 31 == -1); // arithmetic right shift
|
static_assert((-1) >> 31 == -1); // arithmetic right shift
|
||||||
static_assert(CHAR_MAX == 255); // -funsigned-char
|
static_assert(CHAR_MAX == 255); // -funsigned-char
|
||||||
static_assert((char) (-1) == 255);
|
static_assert((char) (-1) == 255); // -funsigned-char
|
||||||
|
|
||||||
// enable some more strict warnings for Git developer builds
|
// enable some more strict warnings for Git developer builds
|
||||||
#if defined(UPX_CONFIG_DISABLE_WSTRICT) && (UPX_CONFIG_DISABLE_WSTRICT + 0 == 0)
|
#if defined(UPX_CONFIG_DISABLE_WSTRICT) && (UPX_CONFIG_DISABLE_WSTRICT + 0 == 0)
|
||||||
@@ -215,20 +217,6 @@ typedef upx_int64_t upx_off_t;
|
|||||||
// portab
|
// portab
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
// some platform system headers may pre-define these, so undef to avoid conflicts
|
|
||||||
#undef _
|
|
||||||
#undef __
|
|
||||||
#undef ___
|
|
||||||
#undef dos
|
|
||||||
#undef large
|
|
||||||
#undef linux
|
|
||||||
#undef PAGE_MASK
|
|
||||||
#undef PAGE_SIZE
|
|
||||||
#undef small
|
|
||||||
#undef SP
|
|
||||||
#undef SS
|
|
||||||
#undef tos
|
|
||||||
#undef unix
|
|
||||||
#if (ACC_OS_POSIX) && !defined(__unix__)
|
#if (ACC_OS_POSIX) && !defined(__unix__)
|
||||||
#define __unix__ 1
|
#define __unix__ 1
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
/* main.cpp --
|
/* main.cpp -- main entry
|
||||||
|
|
||||||
This file is part of the UPX executable compressor.
|
This file is part of the UPX executable compressor.
|
||||||
|
|
||||||
|
|||||||
@@ -40,8 +40,15 @@
|
|||||||
#if defined(__CYGWIN64__) && !defined(__CYGWIN__)
|
#if defined(__CYGWIN64__) && !defined(__CYGWIN__)
|
||||||
#error "missing __CYGWIN__"
|
#error "missing __CYGWIN__"
|
||||||
#endif
|
#endif
|
||||||
#if defined(__clang__) || defined(__GNUC__)
|
#if defined(__MINGW64__) && !defined(__MINGW32__)
|
||||||
|
#error "missing __MINGW32__"
|
||||||
|
#endif
|
||||||
|
#if defined(_WIN64) && !defined(_WIN32)
|
||||||
|
#error "missing _WIN32"
|
||||||
|
#endif
|
||||||
|
|
||||||
// byte order - these are pre-defined since gcc-4.6 (2011) and clang-3.2 (2012)
|
// byte order - these are pre-defined since gcc-4.6 (2011) and clang-3.2 (2012)
|
||||||
|
#if defined(__clang__) || defined(__GNUC__)
|
||||||
#if !defined(__ORDER_BIG_ENDIAN__) || (__ORDER_BIG_ENDIAN__ + 0 == 0)
|
#if !defined(__ORDER_BIG_ENDIAN__) || (__ORDER_BIG_ENDIAN__ + 0 == 0)
|
||||||
#error "missing __ORDER_BIG_ENDIAN__"
|
#error "missing __ORDER_BIG_ENDIAN__"
|
||||||
#endif
|
#endif
|
||||||
@@ -61,6 +68,7 @@
|
|||||||
#error "unexpected __BYTE_ORDER__"
|
#error "unexpected __BYTE_ORDER__"
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// pic and pie
|
// pic and pie
|
||||||
#if defined(__PIC__) && defined(__pic__)
|
#if defined(__PIC__) && defined(__pic__)
|
||||||
static_assert((__PIC__) == (__pic__));
|
static_assert((__PIC__) == (__pic__));
|
||||||
|
|||||||
@@ -0,0 +1,58 @@
|
|||||||
|
/* system_undefs.h -- undef system pre-defines
|
||||||
|
|
||||||
|
This file is part of the UPX executable compressor.
|
||||||
|
|
||||||
|
Copyright (C) 1996-2024 Markus Franz Xaver Johannes Oberhumer
|
||||||
|
All Rights Reserved.
|
||||||
|
|
||||||
|
UPX and the UCL library are free software; you can redistribute them
|
||||||
|
and/or modify them under the terms of the GNU General Public License as
|
||||||
|
published by the Free Software Foundation; either version 2 of
|
||||||
|
the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; see the file COPYING.
|
||||||
|
If not, write to the Free Software Foundation, Inc.,
|
||||||
|
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
|
Markus F.X.J. Oberhumer
|
||||||
|
<markus@oberhumer.com>
|
||||||
|
*/
|
||||||
|
|
||||||
|
// some platform system headers may pre-define these, so undef to avoid conflicts
|
||||||
|
#undef _
|
||||||
|
#undef __
|
||||||
|
#undef ___
|
||||||
|
#undef ____
|
||||||
|
#undef _____
|
||||||
|
#undef MIPSEB
|
||||||
|
#undef MIPSEL
|
||||||
|
#undef PAGE_MASK
|
||||||
|
#undef PAGE_SIZE
|
||||||
|
#undef PPC
|
||||||
|
#undef R3000
|
||||||
|
#undef R4000
|
||||||
|
#undef SP
|
||||||
|
#undef SS
|
||||||
|
#undef WIN32
|
||||||
|
#undef WIN64
|
||||||
|
#undef WINNT
|
||||||
|
#undef dos
|
||||||
|
#undef far
|
||||||
|
#undef huge
|
||||||
|
#undef i386
|
||||||
|
#undef large
|
||||||
|
#undef linux
|
||||||
|
#undef mips
|
||||||
|
#undef near
|
||||||
|
#undef powerpc
|
||||||
|
#undef small
|
||||||
|
#undef tos
|
||||||
|
#undef unix
|
||||||
|
|
||||||
|
/* vim:set ts=4 sw=4 et: */
|
||||||
+5
-5
@@ -1,4 +1,4 @@
|
|||||||
/* work.cpp -- main driver
|
/* work.cpp -- main work driver
|
||||||
|
|
||||||
This file is part of the UPX executable compressor.
|
This file is part of the UPX executable compressor.
|
||||||
|
|
||||||
@@ -26,12 +26,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// This file implements the central loop, and it uses class PackMaster to
|
// This file implements the central loop, and it uses class PackMaster to
|
||||||
// dispatch. PackMaster by itself will instantiate a concrete subclass
|
// dispatch. PackMaster by itself will instantiate a concrete subclass of
|
||||||
// of class PackerBase which then does the actual work.
|
// class PackerBase which then does the actual work; search for "HERE".
|
||||||
// And see p_com.cpp for a simple executable format.
|
// And see p_com.cpp for a simple executable format.
|
||||||
//
|
//
|
||||||
// And this file also has the burden to deal with all those pesky low-level
|
// Additionally this file also has the burden to deal with all those pesky
|
||||||
// file handling issues.
|
// low-level file handling issues.
|
||||||
|
|
||||||
#define WANT_WINDOWS_LEAN_H 1 // _get_osfhandle, GetFileTime, SetFileTime
|
#define WANT_WINDOWS_LEAN_H 1 // _get_osfhandle, GetFileTime, SetFileTime
|
||||||
#include "util/system_headers.h"
|
#include "util/system_headers.h"
|
||||||
|
|||||||
Reference in New Issue
Block a user