CI updates
This commit is contained in:
@@ -1132,6 +1132,7 @@ void upx_compiler_sanity_check(void) noexcept {
|
||||
assert_noexcept(bele->get32(d) == 0xfffefdfc);
|
||||
assert_noexcept(get_be32_signed(d) == -66052);
|
||||
assert_noexcept(get_be64(d) == 0xfffefdfcfbfaf9f8ULL);
|
||||
assert_noexcept(bele->get64(d) == 0xfffefdfcfbfaf9f8ULL);
|
||||
assert_noexcept(get_be64_signed(d) == -283686952306184LL);
|
||||
bele = &N_BELE_RTP::le_policy;
|
||||
assert_noexcept(get_le16(d) == 0xfeff);
|
||||
@@ -1144,6 +1145,7 @@ void upx_compiler_sanity_check(void) noexcept {
|
||||
assert_noexcept(bele->get32(d) == 0xfcfdfeff);
|
||||
assert_noexcept(get_le32_signed(d) == -50462977);
|
||||
assert_noexcept(get_le64(d) == 0xf8f9fafbfcfdfeffULL);
|
||||
assert_noexcept(bele->get64(d) == 0xf8f9fafbfcfdfeffULL);
|
||||
assert_noexcept(get_le64_signed(d) == -506097522914230529LL);
|
||||
static_assert(get_be24(d) == 0xfffefd);
|
||||
static_assert(get_le24(d) == 0xfdfeff);
|
||||
|
||||
+2
-1
@@ -28,7 +28,8 @@
|
||||
#include "conf.h"
|
||||
|
||||
static Options global_options;
|
||||
Options *opt = &global_options; // also see class PackMaster for per-file local options
|
||||
// also see class PackMaster for per-file local options
|
||||
upx_thread_local Options *opt = &global_options;
|
||||
|
||||
#if WITH_THREADS
|
||||
std::mutex opt_lock_mutex; // for locking "opt"
|
||||
|
||||
+2
-1
@@ -30,7 +30,8 @@
|
||||
struct Options;
|
||||
#define options_t Options // old name
|
||||
|
||||
extern Options *opt; // global options, see class PackMaster for per-file local options
|
||||
// global options, see class PackMaster for per-file local options
|
||||
extern upx_thread_local Options *opt;
|
||||
|
||||
#if WITH_THREADS
|
||||
extern std::mutex opt_lock_mutex; // for locking "opt"
|
||||
|
||||
+2
-2
@@ -413,10 +413,10 @@ constexpr bool mem_eq(const unsigned char *a, const unsigned char *b, std::size_
|
||||
return n == 0 || (*a == *b && mem_eq(a + 1, b + 1, n - 1));
|
||||
}
|
||||
constexpr bool mem_eq(const char *a, const unsigned char *b, std::size_t n) noexcept {
|
||||
return n == 0 || (*a == *b && mem_eq(a + 1, b + 1, n - 1));
|
||||
return n == 0 || ((uchar) *a == *b && mem_eq(a + 1, b + 1, n - 1));
|
||||
}
|
||||
constexpr bool mem_eq(const unsigned char *a, const char *b, std::size_t n) noexcept {
|
||||
return n == 0 || (*a == *b && mem_eq(a + 1, b + 1, n - 1));
|
||||
return n == 0 || (*a == (uchar) *b && mem_eq(a + 1, b + 1, n - 1));
|
||||
}
|
||||
|
||||
constexpr void mem_set(char *p, char c, std::size_t n) noexcept {
|
||||
|
||||
@@ -34,14 +34,6 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// aligned_alloc() was added in glibc-2.16
|
||||
#if !defined(_LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION) && defined(__cplusplus)
|
||||
#if defined(__GLIBC__) && defined(__GLIBC_MINOR__) && (__GLIBC__ + 0 == 2) && \
|
||||
(__GLIBC_MINOR__ + 0 > 0) && (__GLIBC_MINOR__ + 0 < 16)
|
||||
#define _LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION
|
||||
#endif
|
||||
#endif // _LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION
|
||||
|
||||
// libc++ hardenining
|
||||
#if defined(__cplusplus) && 0 // TODO later
|
||||
|
||||
@@ -65,4 +57,24 @@
|
||||
|
||||
#endif // TODO later
|
||||
|
||||
// aligned_alloc() was added in glibc-2.16
|
||||
#if !defined(_LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION) && defined(__cplusplus)
|
||||
#if defined(__GLIBC__) && defined(__GLIBC_MINOR__) && (__GLIBC__ + 0 == 2) && \
|
||||
(__GLIBC_MINOR__ + 0 > 0) && (__GLIBC_MINOR__ + 0 < 16)
|
||||
#define _LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION
|
||||
#endif
|
||||
#endif // _LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION
|
||||
|
||||
#if defined(_LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION) && defined(__cplusplus)
|
||||
#if defined(__has_include)
|
||||
#if __has_include(<__config>)
|
||||
#include <__config>
|
||||
#undef _LIBCPP_HAS_LIBRARY_ALIGNED_ALLOCATION
|
||||
#undef _LIBCPP_HAS_ALIGNED_ALLOCATION
|
||||
#define _LIBCPP_HAS_LIBRARY_ALIGNED_ALLOCATION 0
|
||||
#define _LIBCPP_HAS_ALIGNED_ALLOCATION 0
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* vim:set ts=4 sw=4 et: */
|
||||
|
||||
Reference in New Issue
Block a user