all: misc updates
This commit is contained in:
parent
279101d464
commit
b3e4efbabe
12
.github/workflows/ci.yml
vendored
12
.github/workflows/ci.yml
vendored
@ -359,18 +359,24 @@ jobs:
|
||||
needs: [ job-rebuild-and-verify-stubs ]
|
||||
name: ${{ format('zigcc {0} {1}', matrix.zig_target, matrix.zig_pic) }}
|
||||
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:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- { zig_target: aarch64-linux-musl }
|
||||
- { zig_target: aarch64-linux-musl, zig_pic: -fPIE }
|
||||
- { zig_target: aarch64-macos.11-none }
|
||||
- { zig_target: aarch64-macos.12-none }
|
||||
- { zig_target: aarch64-macos.13-none }
|
||||
- { zig_target: aarch64-windows-gnu }
|
||||
- { zig_target: i386-linux-musl }
|
||||
- { 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_pic: -fPIE }
|
||||
- { zig_target: x86_64-macos.11-none }
|
||||
@ -378,8 +384,8 @@ jobs:
|
||||
- { zig_target: x86_64-macos.13-none }
|
||||
- { zig_target: x86_64-windows-gnu }
|
||||
env:
|
||||
# 2023-05-06
|
||||
ZIG_DIST_VERSION: 0.11.0-dev.2991+9f3f9fb40
|
||||
# 2023-05-12
|
||||
ZIG_DIST_VERSION: 0.11.0-dev.3097+7f7bd206d
|
||||
# for zig-cc wrapper scripts (see below):
|
||||
ZIG_CPPFLAGS: -DUPX_DOCTEST_CONFIG_MULTITHREADING
|
||||
ZIG_FLAGS: ${{ matrix.zig_flags }}
|
||||
|
||||
2
.github/workflows/minimal-ci.yml
vendored
2
.github/workflows/minimal-ci.yml
vendored
@ -7,7 +7,7 @@ jobs:
|
||||
job-alpine-cmake:
|
||||
strategy:
|
||||
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) }}
|
||||
runs-on: ubuntu-latest
|
||||
container: ${{ matrix.container }}
|
||||
|
||||
8
.github/workflows/scan-build.yml
vendored
8
.github/workflows/scan-build.yml
vendored
@ -1,4 +1,4 @@
|
||||
name: 'Static Analyzer - scan-build'
|
||||
name: 'Static Analyzer - clang scan-build'
|
||||
|
||||
on:
|
||||
schedule:
|
||||
@ -9,7 +9,7 @@ jobs:
|
||||
analyze:
|
||||
strategy:
|
||||
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) }}
|
||||
runs-on: ubuntu-latest
|
||||
container: ${{ matrix.container }}
|
||||
@ -20,7 +20,7 @@ jobs:
|
||||
run: |
|
||||
git clone --branch "$GITHUB_REF_NAME" --depth 1 https://github.com/upx/upx
|
||||
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'
|
||||
- name: 'Perform scan-build Analysis Release'
|
||||
- name: 'Perform clang scan-build Analysis Release'
|
||||
run: 'make -C upx build/extra/scan-build/release'
|
||||
|
||||
@ -361,8 +361,8 @@ endfunction()
|
||||
if(NOT UPX_CONFIG_CMAKE_DISABLE_PRINT_INFO)
|
||||
print_var(CMAKE_HOST_SYSTEM_NAME CMAKE_HOST_SYSTEM_VERSION)
|
||||
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_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_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_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
|
||||
print_var(CMAKE_INSTALL_PREFIX CMAKE_CONFIGURATION_TYPES CMAKE_BUILD_TYPE)
|
||||
if(CMAKE_BUILD_TYPE AND NOT CMAKE_BUILD_TYPE MATCHES "^(Debug|None|Release)$")
|
||||
|
||||
@ -407,7 +407,7 @@ void show_version(bool one_line) {
|
||||
fprintf(fp, "Copyright (C) 2000-2023 John F. Reiser\n");
|
||||
fprintf(fp, "Copyright (C) 2002-2023 Jens Medoch\n");
|
||||
#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
|
||||
#if (WITH_LZMA)
|
||||
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");
|
||||
#endif
|
||||
#if !defined(DOCTEST_CONFIG_DISABLE)
|
||||
fprintf(fp, "Copyright (C) 2016" "-2021 Viktor Kirilov\n");
|
||||
fprintf(fp, "Copyright (C) 2016" "-2023 Viktor Kirilov\n");
|
||||
#endif
|
||||
fprintf(fp, "UPX comes with ABSOLUTELY NO WARRANTY; for details type '%s -L'.\n", progname);
|
||||
// clang-format on
|
||||
|
||||
12
src/main.cpp
12
src/main.cpp
@ -298,9 +298,9 @@ static char *prepare_shortopts(char *buf, const char *n, const struct mfx_option
|
||||
template <class T>
|
||||
static int getoptvar(T *var, const T min_value, const T max_value, const char *arg_fatal) {
|
||||
const char *p = mfx_optarg;
|
||||
char *endptr;
|
||||
char *endptr = nullptr;
|
||||
int r = 0;
|
||||
long n;
|
||||
long long n;
|
||||
T v;
|
||||
|
||||
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
|
||||
while (p[0] == '0' && isdigit(p[1]))
|
||||
p++;
|
||||
n = strtol(p, &endptr, 0);
|
||||
n = strtoll(p, &endptr, 0);
|
||||
if (*endptr != '\0') {
|
||||
r = -2;
|
||||
goto error;
|
||||
}
|
||||
v = (T) n;
|
||||
if (v < min_value) {
|
||||
if ((long long) v != n || v < min_value || v > max_value) {
|
||||
r = -3;
|
||||
goto error;
|
||||
}
|
||||
if (v > max_value) {
|
||||
r = -4;
|
||||
goto error;
|
||||
}
|
||||
*var = v;
|
||||
goto done;
|
||||
error:
|
||||
|
||||
@ -26,8 +26,6 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#ifndef UPX_PACKER_H__
|
||||
#define UPX_PACKER_H__ 1
|
||||
|
||||
#include "util/membuffer.h"
|
||||
|
||||
@ -102,7 +100,7 @@ bool ph_testOverlappingDecompression(const PackHeader &ph, SPAN_P(const byte) bu
|
||||
/*************************************************************************
|
||||
// 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 {
|
||||
@ -362,6 +360,4 @@ int force_method(int method); // (0x80ul<<24)|method
|
||||
int forced_method(int method); // (0x80ul<<24)|method ==> method
|
||||
int is_forced_method(int method); // predicate
|
||||
|
||||
#endif /* already included */
|
||||
|
||||
/* vim:set ts=4 sw=4 et: */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user