CI updates
This commit is contained in:
@@ -117,7 +117,7 @@ struct TestTriBool {
|
||||
static_assert(sizeof(typename T::value_type) == sizeof(typename T::underlying_type));
|
||||
static_assert(alignof(typename T::value_type) == alignof(typename T::underlying_type));
|
||||
#if (ACC_ARCH_M68K && ACC_OS_TOS && ACC_CC_GNUC) && defined(__MINT__)
|
||||
// broken compiler
|
||||
// broken compiler or broken ABI
|
||||
#else
|
||||
static_assert(sizeof(T) == sizeof(typename T::underlying_type));
|
||||
static_assert(alignof(T) == alignof(typename T::underlying_type));
|
||||
@@ -127,6 +127,14 @@ struct TestTriBool {
|
||||
static_assert(T(T::False) == T::False);
|
||||
static_assert(T(T::True) == T::True);
|
||||
static_assert(T(T::Third) == T::Third);
|
||||
static_assert(T(T::Third) == T(9));
|
||||
static_assert(T(8) == T(9));
|
||||
static_assert(!(T(0) == T(9)));
|
||||
static_assert(!(T(1) == T(9)));
|
||||
static_assert(T(T::Third) == 9);
|
||||
static_assert(T(8) == 9);
|
||||
static_assert(!(T(0) == 9));
|
||||
static_assert(!(T(1) == 9));
|
||||
constexpr T array[] = {false, true, T::Third};
|
||||
static_assert(array[0].isStrictFalse());
|
||||
static_assert(array[1].isStrictTrue());
|
||||
|
||||
+1
-1
@@ -95,7 +95,7 @@ template <class T>
|
||||
inline constexpr bool upx_is_integral_v = upx_is_integral<T>::value;
|
||||
|
||||
#if (ACC_ARCH_M68K && ACC_OS_TOS && ACC_CC_GNUC) && defined(__MINT__)
|
||||
// horrible hack for broken compiler
|
||||
// horrible hack for broken compiler / ABI
|
||||
#define upx_fake_alignas_1 __attribute__((__aligned__(1),__packed__))
|
||||
#define upx_fake_alignas_16 __attribute__((__aligned__(2))) // object file maximum 2 ???
|
||||
#define upx_fake_alignas__(x) upx_fake_alignas_ ## x
|
||||
|
||||
+1
-1
@@ -104,7 +104,7 @@ struct PackerNames {
|
||||
const Options *o;
|
||||
PackerNames() : names_count(0), o(nullptr) {}
|
||||
void add(const PackerBase *pb) {
|
||||
assert(names_count < 64);
|
||||
assert_noexcept(names_count < 64);
|
||||
names[names_count].fname = pb->getFullName(o);
|
||||
names[names_count].sname = pb->getName();
|
||||
names_count++;
|
||||
|
||||
+5
-5
@@ -57,13 +57,13 @@ public:
|
||||
virtual const int *getCompressionMethods(int method, int level) const = 0;
|
||||
virtual const int *getFilters() const = 0;
|
||||
|
||||
// canPack() should throw a cantPackException eplaining why it cannot pack
|
||||
// canPack() should throw a cantPackException explaining why it cannot pack
|
||||
// a recognized format.
|
||||
// canPack() can return -1 to fail early; see class PackMaster
|
||||
// canPack() can also return -1 to fail early; see class PackMaster
|
||||
virtual tribool canPack() = 0;
|
||||
// canUnpack() should throw a cantUnpackException eplaining why it cannot pack
|
||||
// canUnpack() should throw a cantUnpackException explaining why it cannot pack
|
||||
// a recognized format.
|
||||
// canUnpack() can return -1 to fail early; see class PackMaster
|
||||
// canUnpack() can also return -1 to fail early; see class PackMaster
|
||||
virtual tribool canUnpack() = 0;
|
||||
|
||||
// PackMaster entries
|
||||
@@ -80,7 +80,7 @@ protected:
|
||||
InputFile *const fi; // reference
|
||||
union { // unnamed union
|
||||
const upx_int64_t file_size; // must get set by constructor
|
||||
const upx_uint64_t file_size_u; // explicitly unsigned
|
||||
const upx_uint64_t file_size_u; // (explicitly unsigned)
|
||||
};
|
||||
PackHeader ph; // must be filled by canUnpack(); also used by UiPacker
|
||||
};
|
||||
|
||||
@@ -65,6 +65,7 @@ PackMaster::PackMaster(InputFile *f, Options *o) noexcept : fi(f) {
|
||||
// replace global options with local options
|
||||
if (o != nullptr) {
|
||||
#if WITH_THREADS
|
||||
// TODO later: check for possible "noexcept" violation here
|
||||
std::lock_guard<std::mutex> lock(opt_lock_mutex);
|
||||
#endif
|
||||
saved_opt = o;
|
||||
@@ -78,6 +79,7 @@ PackMaster::~PackMaster() noexcept {
|
||||
// restore global options
|
||||
if (saved_opt != nullptr) {
|
||||
#if WITH_THREADS
|
||||
// TODO later: check for possible "noexcept" violation here
|
||||
std::lock_guard<std::mutex> lock(opt_lock_mutex);
|
||||
#endif
|
||||
opt = saved_opt;
|
||||
|
||||
+3
-1
@@ -121,7 +121,9 @@ struct TriBool final {
|
||||
// equality
|
||||
constexpr bool operator==(TriBool other) const noexcept { return value == other.value; }
|
||||
constexpr bool operator==(value_type other) const noexcept { return value == other; }
|
||||
constexpr bool operator==(promoted_type other) const noexcept { return value == other; }
|
||||
constexpr bool operator==(promoted_type other) const noexcept {
|
||||
return value == TriBool(other).value;
|
||||
}
|
||||
|
||||
// "Third" can mean many things, depending on usage context, so provide some alternative names:
|
||||
// constexpr bool isDefault() const noexcept { return isThird(); } // might be misleading
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
#define UPX_VERSION_HEX 0x040200 /* 04.02.00 */
|
||||
#define UPX_VERSION_STRING "4.2.0"
|
||||
#define UPX_VERSION_STRING4 "4.20"
|
||||
#define UPX_VERSION_DATE "Aug 8th 2023"
|
||||
#define UPX_VERSION_DATE_ISO "2023-08-08"
|
||||
#define UPX_VERSION_DATE "Aug 25th 2023"
|
||||
#define UPX_VERSION_DATE_ISO "2023-08-25"
|
||||
#define UPX_VERSION_YEAR "2023"
|
||||
|
||||
Reference in New Issue
Block a user