all: misc updates
This commit is contained in:
@@ -359,18 +359,24 @@ jobs:
|
|||||||
needs: [ job-rebuild-and-verify-stubs ]
|
needs: [ job-rebuild-and-verify-stubs ]
|
||||||
name: ${{ format('zigcc {0} {1}', matrix.zig_target, matrix.zig_pic) }}
|
name: ${{ format('zigcc {0} {1}', matrix.zig_target, matrix.zig_pic) }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
##container: alpine:3.17 # older versions such as alpine:3.12 also work; no-container also works
|
container: 'alpine:3.18' # older versions such as alpine:3.12 also work; no-container also works
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- { zig_target: aarch64-linux-musl }
|
- { zig_target: aarch64-linux-musl }
|
||||||
|
- { zig_target: aarch64-linux-musl, zig_pic: -fPIE }
|
||||||
- { zig_target: aarch64-macos.11-none }
|
- { zig_target: aarch64-macos.11-none }
|
||||||
- { zig_target: aarch64-macos.12-none }
|
- { zig_target: aarch64-macos.12-none }
|
||||||
- { zig_target: aarch64-macos.13-none }
|
- { zig_target: aarch64-macos.13-none }
|
||||||
- { zig_target: aarch64-windows-gnu }
|
- { zig_target: aarch64-windows-gnu }
|
||||||
- { zig_target: i386-linux-musl }
|
- { zig_target: i386-linux-musl }
|
||||||
- { zig_target: i386-windows-gnu }
|
- { zig_target: i386-windows-gnu }
|
||||||
|
- { zig_target: mips-linux-musl }
|
||||||
|
- { zig_target: mipsel-linux-musl }
|
||||||
|
- { zig_target: powerpc-linux-musl }
|
||||||
|
- { zig_target: powerpc64-linux-musl }
|
||||||
|
- { zig_target: powerpc64le-linux-musl }
|
||||||
- { zig_target: x86_64-linux-musl }
|
- { zig_target: x86_64-linux-musl }
|
||||||
- { zig_target: x86_64-linux-musl, zig_pic: -fPIE }
|
- { zig_target: x86_64-linux-musl, zig_pic: -fPIE }
|
||||||
- { zig_target: x86_64-macos.11-none }
|
- { zig_target: x86_64-macos.11-none }
|
||||||
@@ -378,8 +384,8 @@ jobs:
|
|||||||
- { zig_target: x86_64-macos.13-none }
|
- { zig_target: x86_64-macos.13-none }
|
||||||
- { zig_target: x86_64-windows-gnu }
|
- { zig_target: x86_64-windows-gnu }
|
||||||
env:
|
env:
|
||||||
# 2023-05-06
|
# 2023-05-12
|
||||||
ZIG_DIST_VERSION: 0.11.0-dev.2991+9f3f9fb40
|
ZIG_DIST_VERSION: 0.11.0-dev.3097+7f7bd206d
|
||||||
# for zig-cc wrapper scripts (see below):
|
# for zig-cc wrapper scripts (see below):
|
||||||
ZIG_CPPFLAGS: -DUPX_DOCTEST_CONFIG_MULTITHREADING
|
ZIG_CPPFLAGS: -DUPX_DOCTEST_CONFIG_MULTITHREADING
|
||||||
ZIG_FLAGS: ${{ matrix.zig_flags }}
|
ZIG_FLAGS: ${{ matrix.zig_flags }}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ jobs:
|
|||||||
job-alpine-cmake:
|
job-alpine-cmake:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix: { container: ['alpine:3.12','alpine:3.17','alpine:edge','i386/alpine:edge'] }
|
matrix: { container: ['alpine:3.12','alpine:3.18','alpine:edge','i386/alpine:edge'] }
|
||||||
name: ${{ format('container {0}', matrix.container) }}
|
name: ${{ format('container {0}', matrix.container) }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: ${{ matrix.container }}
|
container: ${{ matrix.container }}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
name: 'Static Analyzer - scan-build'
|
name: 'Static Analyzer - clang scan-build'
|
||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
@@ -9,7 +9,7 @@ jobs:
|
|||||||
analyze:
|
analyze:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix: {container: ['alpine:3.16','alpine:3.17','alpine:edge','i386/alpine:edge']}
|
matrix: {container: ['alpine:3.16','alpine:3.17','alpine:3.18','alpine:edge','i386/alpine:edge']}
|
||||||
name: ${{ format('Analyze {0}', matrix.container) }}
|
name: ${{ format('Analyze {0}', matrix.container) }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: ${{ matrix.container }}
|
container: ${{ matrix.container }}
|
||||||
@@ -20,7 +20,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
git clone --branch "$GITHUB_REF_NAME" --depth 1 https://github.com/upx/upx
|
git clone --branch "$GITHUB_REF_NAME" --depth 1 https://github.com/upx/upx
|
||||||
git -C upx submodule update --init
|
git -C upx submodule update --init
|
||||||
- name: 'Perform scan-build Analysis Debug'
|
- name: 'Perform clang scan-build Analysis Debug'
|
||||||
run: 'make -C upx build/extra/scan-build/debug'
|
run: 'make -C upx build/extra/scan-build/debug'
|
||||||
- name: 'Perform scan-build Analysis Release'
|
- name: 'Perform clang scan-build Analysis Release'
|
||||||
run: 'make -C upx build/extra/scan-build/release'
|
run: 'make -C upx build/extra/scan-build/release'
|
||||||
|
|||||||
+2
-2
@@ -361,8 +361,8 @@ endfunction()
|
|||||||
if(NOT UPX_CONFIG_CMAKE_DISABLE_PRINT_INFO)
|
if(NOT UPX_CONFIG_CMAKE_DISABLE_PRINT_INFO)
|
||||||
print_var(CMAKE_HOST_SYSTEM_NAME CMAKE_HOST_SYSTEM_VERSION)
|
print_var(CMAKE_HOST_SYSTEM_NAME CMAKE_HOST_SYSTEM_VERSION)
|
||||||
print_var(CMAKE_SYSTEM_NAME CMAKE_SYSTEM_VERSION CMAKE_CROSSCOMPILING)
|
print_var(CMAKE_SYSTEM_NAME CMAKE_SYSTEM_VERSION CMAKE_CROSSCOMPILING)
|
||||||
print_var(CMAKE_C_COMPILER_ID CMAKE_C_COMPILER_FRONTEND_VARIANT CMAKE_C_COMPILER_VERSION CMAKE_C_COMPILER_ARCHITECTURE_ID CMAKE_C_PLATFORM_ID CMAKE_C_COMPILER_ABI)
|
print_var(CMAKE_C_COMPILER_ID CMAKE_C_COMPILER_VERSION CMAKE_C_COMPILER_FRONTEND_VARIANT CMAKE_C_COMPILER_ARCHITECTURE_ID CMAKE_C_PLATFORM_ID CMAKE_C_COMPILER_ABI)
|
||||||
print_var(CMAKE_CXX_COMPILER_ID CMAKE_CXX_COMPILER_FRONTEND_VARIANT CMAKE_CXX_COMPILER_VERSION CMAKE_CXX_COMPILER_ARCHITECTURE_ID CMAKE_CXX_PLATFORM_ID CMAKE_CXX_COMPILER_ABI)
|
print_var(CMAKE_CXX_COMPILER_ID CMAKE_CXX_COMPILER_VERSION CMAKE_CXX_COMPILER_FRONTEND_VARIANT CMAKE_CXX_COMPILER_ARCHITECTURE_ID CMAKE_CXX_PLATFORM_ID CMAKE_CXX_COMPILER_ABI)
|
||||||
endif() # UPX_CONFIG_CMAKE_DISABLE_PRINT_INFO
|
endif() # UPX_CONFIG_CMAKE_DISABLE_PRINT_INFO
|
||||||
print_var(CMAKE_INSTALL_PREFIX CMAKE_CONFIGURATION_TYPES CMAKE_BUILD_TYPE)
|
print_var(CMAKE_INSTALL_PREFIX CMAKE_CONFIGURATION_TYPES CMAKE_BUILD_TYPE)
|
||||||
if(CMAKE_BUILD_TYPE AND NOT CMAKE_BUILD_TYPE MATCHES "^(Debug|None|Release)$")
|
if(CMAKE_BUILD_TYPE AND NOT CMAKE_BUILD_TYPE MATCHES "^(Debug|None|Release)$")
|
||||||
|
|||||||
+2
-2
@@ -407,7 +407,7 @@ void show_version(bool one_line) {
|
|||||||
fprintf(fp, "Copyright (C) 2000-2023 John F. Reiser\n");
|
fprintf(fp, "Copyright (C) 2000-2023 John F. Reiser\n");
|
||||||
fprintf(fp, "Copyright (C) 2002-2023 Jens Medoch\n");
|
fprintf(fp, "Copyright (C) 2002-2023 Jens Medoch\n");
|
||||||
#if (WITH_ZLIB)
|
#if (WITH_ZLIB)
|
||||||
fprintf(fp, "Copyright (C) 1995" "-2022 Jean-loup Gailly and Mark Adler\n");
|
fprintf(fp, "Copyright (C) 1995" "-2023 Jean-loup Gailly and Mark Adler\n");
|
||||||
#endif
|
#endif
|
||||||
#if (WITH_LZMA)
|
#if (WITH_LZMA)
|
||||||
fprintf(fp, "Copyright (C) 1999" "-2006 Igor Pavlov\n");
|
fprintf(fp, "Copyright (C) 1999" "-2006 Igor Pavlov\n");
|
||||||
@@ -417,7 +417,7 @@ void show_version(bool one_line) {
|
|||||||
fprintf(fp, "Copyright (C) 2015" "-2023 Meta Platforms, Inc. and affiliates\n");
|
fprintf(fp, "Copyright (C) 2015" "-2023 Meta Platforms, Inc. and affiliates\n");
|
||||||
#endif
|
#endif
|
||||||
#if !defined(DOCTEST_CONFIG_DISABLE)
|
#if !defined(DOCTEST_CONFIG_DISABLE)
|
||||||
fprintf(fp, "Copyright (C) 2016" "-2021 Viktor Kirilov\n");
|
fprintf(fp, "Copyright (C) 2016" "-2023 Viktor Kirilov\n");
|
||||||
#endif
|
#endif
|
||||||
fprintf(fp, "UPX comes with ABSOLUTELY NO WARRANTY; for details type '%s -L'.\n", progname);
|
fprintf(fp, "UPX comes with ABSOLUTELY NO WARRANTY; for details type '%s -L'.\n", progname);
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
|||||||
+4
-8
@@ -298,9 +298,9 @@ static char *prepare_shortopts(char *buf, const char *n, const struct mfx_option
|
|||||||
template <class T>
|
template <class T>
|
||||||
static int getoptvar(T *var, const T min_value, const T max_value, const char *arg_fatal) {
|
static int getoptvar(T *var, const T min_value, const T max_value, const char *arg_fatal) {
|
||||||
const char *p = mfx_optarg;
|
const char *p = mfx_optarg;
|
||||||
char *endptr;
|
char *endptr = nullptr;
|
||||||
int r = 0;
|
int r = 0;
|
||||||
long n;
|
long long n;
|
||||||
T v;
|
T v;
|
||||||
|
|
||||||
if (!p || !p[0]) {
|
if (!p || !p[0]) {
|
||||||
@@ -310,20 +310,16 @@ static int getoptvar(T *var, const T min_value, const T max_value, const char *a
|
|||||||
// avoid interpretation as octal value
|
// avoid interpretation as octal value
|
||||||
while (p[0] == '0' && isdigit(p[1]))
|
while (p[0] == '0' && isdigit(p[1]))
|
||||||
p++;
|
p++;
|
||||||
n = strtol(p, &endptr, 0);
|
n = strtoll(p, &endptr, 0);
|
||||||
if (*endptr != '\0') {
|
if (*endptr != '\0') {
|
||||||
r = -2;
|
r = -2;
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
v = (T) n;
|
v = (T) n;
|
||||||
if (v < min_value) {
|
if ((long long) v != n || v < min_value || v > max_value) {
|
||||||
r = -3;
|
r = -3;
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
if (v > max_value) {
|
|
||||||
r = -4;
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
*var = v;
|
*var = v;
|
||||||
goto done;
|
goto done;
|
||||||
error:
|
error:
|
||||||
|
|||||||
+1
-5
@@ -26,8 +26,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
#ifndef UPX_PACKER_H__
|
|
||||||
#define UPX_PACKER_H__ 1
|
|
||||||
|
|
||||||
#include "util/membuffer.h"
|
#include "util/membuffer.h"
|
||||||
|
|
||||||
@@ -102,7 +100,7 @@ bool ph_testOverlappingDecompression(const PackHeader &ph, SPAN_P(const byte) bu
|
|||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
// abstract base class for packers
|
// abstract base class for packers
|
||||||
//
|
//
|
||||||
// FIXME: this class is way too fat and badly needs a decomposition
|
// FIXME later: this class is way too fat and badly needs a decomposition
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
class Packer {
|
class Packer {
|
||||||
@@ -362,6 +360,4 @@ int force_method(int method); // (0x80ul<<24)|method
|
|||||||
int forced_method(int method); // (0x80ul<<24)|method ==> method
|
int forced_method(int method); // (0x80ul<<24)|method ==> method
|
||||||
int is_forced_method(int method); // predicate
|
int is_forced_method(int method); // predicate
|
||||||
|
|
||||||
#endif /* already included */
|
|
||||||
|
|
||||||
/* vim:set ts=4 sw=4 et: */
|
/* vim:set ts=4 sw=4 et: */
|
||||||
|
|||||||
Reference in New Issue
Block a user