From 757401dd0cfb92ac58be8e4d76d4dfeafb13f18d Mon Sep 17 00:00:00 2001 From: "Markus F.X.J. Oberhumer" Date: Wed, 9 Aug 2023 13:08:38 +0200 Subject: [PATCH] CI and spell checks --- .github/typos_config.toml | 7 ++++--- .github/workflows/ci.yml | 4 ++-- .github/workflows/github-close-inactive-issues.yml | 2 +- .github/workflows/static-analyzer-clang-analyzer.yml | 2 +- .github/workflows/static-analyzer-clang-tidy.yml | 6 +++--- .github/workflows/static-analyzer-codeql.yml | 2 +- .github/workflows/weekly-ci-alpine-linux.yml | 2 +- .github/workflows/weekly-ci-cmake-macos-xcode.yml | 2 +- .github/workflows/weekly-ci-cmake-windows-nmake.yml | 2 +- .github/workflows/weekly-ci-llvm-mingw.yml | 2 +- .github/workflows/weekly-ci-zigcc.yml | 6 +++--- Makefile | 2 +- src/p_lx_elf.cpp | 4 ++-- src/stub/src/arch/powerpc/32/nrv2b_d.S | 10 +++++----- src/stub/src/arch/powerpc/32/nrv2d_d.S | 8 ++++---- src/stub/src/arch/powerpc/32/nrv2e_d.S | 8 ++++---- src/stub/src/arch/powerpc/64le/nrv2b_d.S | 8 ++++---- src/stub/src/arch/powerpc/64le/nrv2d_d.S | 8 ++++---- src/stub/src/arch/powerpc/64le/nrv2e_d.S | 12 ++++++------ src/stub/src/powerpc-darwin.macho-fold.S | 2 +- src/stub/src/powerpc64-darwin.macho-fold.S | 2 +- 21 files changed, 51 insertions(+), 50 deletions(-) diff --git a/.github/typos_config.toml b/.github/typos_config.toml index 1f71d736..ee754dde 100644 --- a/.github/typos_config.toml +++ b/.github/typos_config.toml @@ -4,7 +4,7 @@ # tricky, so some false positives are fine [files] -extend-exclude = ["LICENSE", "misc/*/packages.txt", "misc/*/*/packages.txt"] +extend-exclude = ["LICENSE", "misc/*podman*/*/packages.txt"] [default.extend-identifiers] # misc variable names & symbols @@ -13,12 +13,13 @@ ba = "ba" fo = "fo" fof = "fof" O_WRONLY = "O_WRONLY" -# clang-analyzer-optin.cplusplus +# optin: clang-analyzer-optin.cplusplus optin = "optin" sidelen = "sidelen" +# macOS 11 "Big Sur" +Sur = "Sur" tpos = "tpos" # assembly sources -CArry = "CArry" hda = "hda" Larg = "Larg" pard = "pard" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8d4bc32e..f447b742 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,8 +12,8 @@ env: CMAKE_REQUIRED_QUIET: OFF DEBIAN_FRONTEND: noninteractive UPX_CMAKE_BUILD_FLAGS: --verbose - # 2023-08-07 - ZIG_DIST_VERSION: 0.12.0-dev.21+ac95cfe44 + # 2023-08-09 + ZIG_DIST_VERSION: 0.12.0-dev.25+36c57c3ba jobs: job-rebuild-and-verify-stubs: diff --git a/.github/workflows/github-close-inactive-issues.yml b/.github/workflows/github-close-inactive-issues.yml index 3b8da8ea..948cc6fd 100644 --- a/.github/workflows/github-close-inactive-issues.yml +++ b/.github/workflows/github-close-inactive-issues.yml @@ -14,7 +14,7 @@ name: 'GitHub - Close inactive issues' on: - schedule: [cron: '50 3 * * 3'] # run weekly Wednesday 03:50 UTC + schedule: [cron: '50 2 * * 3'] # run weekly Wednesday 02:50 UTC workflow_dispatch: jobs: close-issues: diff --git a/.github/workflows/static-analyzer-clang-analyzer.yml b/.github/workflows/static-analyzer-clang-analyzer.yml index ecb8c01f..3df2f060 100644 --- a/.github/workflows/static-analyzer-clang-analyzer.yml +++ b/.github/workflows/static-analyzer-clang-analyzer.yml @@ -2,7 +2,7 @@ name: 'Static Analyzer - clang-analyzer' on: - schedule: [cron: '10 5 * * 3'] # run weekly Wednesday 05:10 UTC + schedule: [cron: '10 4 * * 3'] # run weekly Wednesday 04:10 UTC workflow_dispatch: env: CMAKE_REQUIRED_QUIET: OFF diff --git a/.github/workflows/static-analyzer-clang-tidy.yml b/.github/workflows/static-analyzer-clang-tidy.yml index 11edf706..46f50319 100644 --- a/.github/workflows/static-analyzer-clang-tidy.yml +++ b/.github/workflows/static-analyzer-clang-tidy.yml @@ -2,7 +2,7 @@ name: 'Static Analyzer - clang-tidy' on: - schedule: [cron: '30 5 * * 3'] # run weekly Wednesday 05:30 UTC + schedule: [cron: '30 4 * * 3'] # run weekly Wednesday 04:30 UTC workflow_dispatch: env: CMAKE_REQUIRED_QUIET: OFF @@ -24,7 +24,7 @@ jobs: git clone --branch "$GITHUB_REF_NAME" --depth 1 https://github.com/upx/upx git -C upx submodule update --init - name: 'Perform clang-tidy Analysis Debug' - run: 'make -k -C upx build/analyze/clang-tidy/debug' + run: 'make -C upx -k build/analyze/clang-tidy/debug' - name: 'Perform clang-tidy Analysis Release' if: success() || failure() # run this step even if the previous step failed - run: 'make -k -C upx build/analyze/clang-tidy/release' + run: 'make -C upx -k build/analyze/clang-tidy/release' diff --git a/.github/workflows/static-analyzer-codeql.yml b/.github/workflows/static-analyzer-codeql.yml index d2b0ae59..ebbe9006 100644 --- a/.github/workflows/static-analyzer-codeql.yml +++ b/.github/workflows/static-analyzer-codeql.yml @@ -2,7 +2,7 @@ name: 'Static Analyzer - CodeQL' on: - schedule: [cron: '50 5 * * 3'] # run weekly Wednesday 05:50 UTC + schedule: [cron: '50 4 * * 3'] # run weekly Wednesday 04:50 UTC workflow_dispatch: env: CMAKE_REQUIRED_QUIET: OFF diff --git a/.github/workflows/weekly-ci-alpine-linux.yml b/.github/workflows/weekly-ci-alpine-linux.yml index 6a5b45b7..3b1e8e41 100644 --- a/.github/workflows/weekly-ci-alpine-linux.yml +++ b/.github/workflows/weekly-ci-alpine-linux.yml @@ -10,7 +10,7 @@ name: 'Weekly CI - Alpine Linux' on: - schedule: [cron: '05 4 * * 3'] # run weekly Wednesday 04:05 UTC + schedule: [cron: '05 3 * * 3'] # run weekly Wednesday 03:05 UTC workflow_dispatch: env: CMAKE_REQUIRED_QUIET: OFF diff --git a/.github/workflows/weekly-ci-cmake-macos-xcode.yml b/.github/workflows/weekly-ci-cmake-macos-xcode.yml index e79a89c6..7c0aabb0 100644 --- a/.github/workflows/weekly-ci-cmake-macos-xcode.yml +++ b/.github/workflows/weekly-ci-cmake-macos-xcode.yml @@ -3,7 +3,7 @@ name: 'Weekly CI - cmake macOS Xcode' on: - schedule: [cron: '20 4 * * 3'] # run weekly Wednesday 04:20 UTC + schedule: [cron: '20 3 * * 3'] # run weekly Wednesday 03:20 UTC workflow_dispatch: env: CMAKE_REQUIRED_QUIET: OFF diff --git a/.github/workflows/weekly-ci-cmake-windows-nmake.yml b/.github/workflows/weekly-ci-cmake-windows-nmake.yml index 4766d742..5f3fc821 100644 --- a/.github/workflows/weekly-ci-cmake-windows-nmake.yml +++ b/.github/workflows/weekly-ci-cmake-windows-nmake.yml @@ -3,7 +3,7 @@ name: 'Weekly CI - cmake Windows NMake' on: - schedule: [cron: '30 4 * * 3'] # run weekly Wednesday 04:30 UTC + schedule: [cron: '30 3 * * 3'] # run weekly Wednesday 03:30 UTC workflow_dispatch: env: CMAKE_REQUIRED_QUIET: OFF diff --git a/.github/workflows/weekly-ci-llvm-mingw.yml b/.github/workflows/weekly-ci-llvm-mingw.yml index 81a3d3f6..966f488a 100644 --- a/.github/workflows/weekly-ci-llvm-mingw.yml +++ b/.github/workflows/weekly-ci-llvm-mingw.yml @@ -3,7 +3,7 @@ name: 'Weekly CI - llvm-mingw' on: - schedule: [cron: '40 4 * * 3'] # run weekly Wednesday 04:40 UTC + schedule: [cron: '40 3 * * 3'] # run weekly Wednesday 03:40 UTC workflow_dispatch: env: CMAKE_REQUIRED_QUIET: OFF diff --git a/.github/workflows/weekly-ci-zigcc.yml b/.github/workflows/weekly-ci-zigcc.yml index 8e37bad9..c3cb1438 100644 --- a/.github/workflows/weekly-ci-zigcc.yml +++ b/.github/workflows/weekly-ci-zigcc.yml @@ -3,13 +3,13 @@ name: 'Weekly CI - zigcc' on: - schedule: [cron: '50 4 * * 3'] # run weekly Wednesday 04:50 UTC + schedule: [cron: '50 3 * * 3'] # run weekly Wednesday 03:50 UTC workflow_dispatch: env: CMAKE_REQUIRED_QUIET: OFF DEBIAN_FRONTEND: noninteractive - # 2023-08-07 - ZIG_DIST_VERSION: 0.12.0-dev.21+ac95cfe44 + # 2023-08-09 + ZIG_DIST_VERSION: 0.12.0-dev.25+36c57c3ba jobs: job-linux-zigcc: # uses cmake + make diff --git a/Makefile b/Makefile index 4a10c3d6..3d52e5e4 100644 --- a/Makefile +++ b/Makefile @@ -190,7 +190,7 @@ build/analyze/clang-tidy/debug build/analyze/clang-tidy/release: build/analyze/c build/analyze/clang-tidy/debug build/analyze/clang-tidy/release: build/analyze/clang-tidy-zlib/$$(notdir $$@) build/analyze/clang-tidy/debug build/analyze/clang-tidy/release: build/analyze/clang-tidy-zstd/$$(notdir $$@) -# OLD names +# OLD names [deprecated] build/extra/scan-build/debug: build/analyze/clang-analyzer/debug build/extra/scan-build/release: build/analyze/clang-analyzer/release diff --git a/src/p_lx_elf.cpp b/src/p_lx_elf.cpp index 0e351551..865034a5 100644 --- a/src/p_lx_elf.cpp +++ b/src/p_lx_elf.cpp @@ -5114,7 +5114,7 @@ int PackLinuxElf32::pack2(OutputFile *fo, Filter &ft) } } - else { // defnitely compressible unless writeable + else { // definitely compressible unless writeable if (!(Elf32_Phdr::PF_W & get_te32(&phdri[k].p_flags))) { // Read-only PT_LOAD, assume not written by relocations. // Also assume not the source for R_*_COPY relocation, @@ -5371,7 +5371,7 @@ int PackLinuxElf64::pack2(OutputFile *fo, Filter &ft) packExtent(x, &ft, fo, 0, 0, true); } } - else { // defnitely compressible unless writeable + else { // definitely compressible unless writeable if (!(Elf64_Phdr::PF_W & get_te32(&phdri[k].p_flags))) { // Read-only PT_LOAD, assume not written by relocations. // Also assume not the source for R_*_COPY relocation, diff --git a/src/stub/src/arch/powerpc/32/nrv2b_d.S b/src/stub/src/arch/powerpc/32/nrv2b_d.S index a98adbdd..12f821b1 100644 --- a/src/stub/src/arch/powerpc/32/nrv2b_d.S +++ b/src/stub/src/arch/powerpc/32/nrv2b_d.S @@ -67,10 +67,10 @@ get1: cmpl cr0,bits,hibit // cr0 for jnextb - addc bits,bits,bits // CArry for getnextb + addc bits,bits,bits // Carry for getnextb bnelr+ cr0 // return if reload not needed; likely 31/32 -/* CArry has been set from adding 0x80000000 to itself; preserve for 'adde' */ +/* Carry has been set from adding 0x80000000 to itself; preserve for 'adde' */ // fetch 4 bytes unaligned and LITTLE ENDIAN #if 0 /*{ clean; but 4 instr larger, and 3 cycles longer */ lbz bits,1(src) // lo8 @@ -84,7 +84,7 @@ get1: #endif /*}*/ cmpl cr0,bits,hibit // cr0 for jnextb - adde bits,bits,bits // CArry for getnextb; set lo bit from CarryIn + adde bits,bits,bits // Carry for getnextb; set lo bit from CarryIn ret lit_n2b: @@ -99,7 +99,7 @@ offmore_n2b: getnextb(off) jnextb0n offmore_n2b - addic. off,off,-3 // CArry set [and ignored], but no 'addi.' + addic. off,off,-3 // Carry set [and ignored], but no 'addi.' li len,0 blt- offprev_n2b lbzu t1,1(src) @@ -116,7 +116,7 @@ lenmore_n2b: getnextb(len) jnextb0n lenmore_n2b gotlen_n2b: - subfic t1,disp,(~0)+(-0xd00) // want CArry only + subfic t1,disp,(~0)+(-0xd00) // want Carry only adde len,len,off // len += off + (disp < -0xd00); copy: diff --git a/src/stub/src/arch/powerpc/32/nrv2d_d.S b/src/stub/src/arch/powerpc/32/nrv2d_d.S index 03390bff..ae6cf037 100644 --- a/src/stub/src/arch/powerpc/32/nrv2d_d.S +++ b/src/stub/src/arch/powerpc/32/nrv2d_d.S @@ -81,7 +81,7 @@ get32d: #endif /*}*/ cmpl cr0,bits,hibit // cr0 for jnextb - addc bits,bits,bits // CArry for getnextb + addc bits,bits,bits // Carry for getnextb ori bits,bits,1 // the flag bit ret @@ -103,12 +103,12 @@ getoff_n2d: jnextb0n off_n2d li len,0 - addic. off,off,-3 // CArry set [and ignored], but no 'addi.' + addic. off,off,-3 // Carry set [and ignored], but no 'addi.' rlwinm off,off,8,0,31-8 // off<<=8; blt- offprev_n2d lbzu t1,1(src) nor. disp,off,t1 // disp = -(1+ (off|t1)); - srawi disp,disp,1 // shift off low bit (sets CArry) + srawi disp,disp,1 // shift off low bit (sets Carry) beq- eof_nrv // test the 'nor' b len_n2d -4 // CHEAT [getnextb ends "adde. len,len,len"]: bit from srawi offprev_n2d: @@ -123,7 +123,7 @@ lenmore_n2d: gotlen_n2d: #define tmp off - subfic tmp,disp,(~0)+(-0x500) // want CArry only + subfic tmp,disp,(~0)+(-0x500) // want Carry only #undef tmp addi len,len,1 addze len,len // len += (disp < -0x500); diff --git a/src/stub/src/arch/powerpc/32/nrv2e_d.S b/src/stub/src/arch/powerpc/32/nrv2e_d.S index d7ef5beb..6e2354b5 100644 --- a/src/stub/src/arch/powerpc/32/nrv2e_d.S +++ b/src/stub/src/arch/powerpc/32/nrv2e_d.S @@ -81,7 +81,7 @@ get32: #endif /*}*/ cmpl 0,bits,hibit // cr0 for jnextb - addc bits,bits,bits // CArry for getnextb + addc bits,bits,bits // Carry for getnextb ori bits,bits,1 // the flag bit ret @@ -103,12 +103,12 @@ getoff_n2e: jnextb0n off_n2e li len,0 - addic. off,off,-3 // CArry set [and ignored], but no 'addi.' + addic. off,off,-3 // Carry set [and ignored], but no 'addi.' slwi off,off,8 // off<<=8; blt- offprev_n2e lbzu t1,1(src) nor. disp,off,t1 // disp = -(1+ (off|t1)); - srawi disp,disp,1 // shift off low bit (sets CArry; ignored) + srawi disp,disp,1 // shift off low bit (sets Carry; ignored) beq- eof_nrv andi. t1,t1,1 // complement of low bit of unshifted disp beq+ lenlast_n2e // low bit was 1 @@ -129,7 +129,7 @@ lenlast_n2e: getnextb(len) // 0,1,2,3 gotlen_n2e: #define tmp off - subfic tmp,disp,(~0)+(-0x500) // want CArry only + subfic tmp,disp,(~0)+(-0x500) // want Carry only #undef tmp addi len,len,2 addze len,len // len += (disp < -0x500); diff --git a/src/stub/src/arch/powerpc/64le/nrv2b_d.S b/src/stub/src/arch/powerpc/64le/nrv2b_d.S index 9c929c45..763282c2 100644 --- a/src/stub/src/arch/powerpc/64le/nrv2b_d.S +++ b/src/stub/src/arch/powerpc/64le/nrv2b_d.S @@ -67,11 +67,11 @@ #define getnextb(reg) call get1; adde. reg,reg,reg get2: - adde bits,bits,bits // shift in CArry from 'addc' below + adde bits,bits,bits // shift in Carry from 'addc' below sldi bits,bits,32-1 // left justify 33-bit result get1: cmpld bits,hibit // cr0 for jnextb - addc bits,bits,bits // CArry for getnextb + addc bits,bits,bits // Carry for getnextb bnelr+ cr0 // return if reload not needed; likely 31/32 // fetch 4 bytes unaligned and LITTLE ENDIAN @@ -103,7 +103,7 @@ offmore_n2b: getnextb(off) jnextb0n offmore_n2b - addic. off,off,-3 // CArry set [and ignored], but no 'addi.' + addic. off,off,-3 // Carry set [and ignored], but no 'addi.' li len,0 blt- offprev_n2b lbzu t1,1(src) @@ -121,7 +121,7 @@ lenmore_n2b: getnextb(len) jnextb0n lenmore_n2b gotlen_n2b: - subfic t1,disp,(~0)+(-0xd00) // want CArry only + subfic t1,disp,(~0)+(-0xd00) // want Carry only adde len,len,off // len += off + (disp < -0xd00); copy: diff --git a/src/stub/src/arch/powerpc/64le/nrv2d_d.S b/src/stub/src/arch/powerpc/64le/nrv2d_d.S index 78a60da6..ddffc303 100644 --- a/src/stub/src/arch/powerpc/64le/nrv2d_d.S +++ b/src/stub/src/arch/powerpc/64le/nrv2d_d.S @@ -88,7 +88,7 @@ get32d: rldicr bits,bits,32,31 // upper bits cmpld bits,hibit // cr0 for jnextb - addc bits,bits,bits // CArry for getnextb + addc bits,bits,bits // Carry for getnextb li t2,1 // flag bit on upper bit pos rldicr t2,t2,32,31 or bits,bits,t2 // the flag bit @@ -112,12 +112,12 @@ getoff_n2d: jnextb0n off_n2d li len,0 - addic. off,off,-3 // CArry set [and ignored], but no 'addi.' + addic. off,off,-3 // Carry set [and ignored], but no 'addi.' rlwinm off,off,8,0,31-8 // off<<=8; blt- offprev_n2d lbzu r0,1(src) nor. disp,off,r0 // disp = -(1+ (off|r0)); - srawi disp,disp,1 // shift off low bit (sets CArry) + srawi disp,disp,1 // shift off low bit (sets Carry) cmpdi disp,0 // test result of srawi instead of nor. beq- eof_nrv // b len_n2d -4 // CHEAT [getnextb ends "adde. len,len,len"]: bit from srawi @@ -133,7 +133,7 @@ lenmore_n2d: gotlen_n2d: #define tmp off - subfic tmp,disp,(~0)+(-0x500) // want CArry only + subfic tmp,disp,(~0)+(-0x500) // want Carry only #undef tmp addi len,len,1 addze len,len // len += (disp < -0x500); diff --git a/src/stub/src/arch/powerpc/64le/nrv2e_d.S b/src/stub/src/arch/powerpc/64le/nrv2e_d.S index 36ee21cb..5d86658a 100644 --- a/src/stub/src/arch/powerpc/64le/nrv2e_d.S +++ b/src/stub/src/arch/powerpc/64le/nrv2e_d.S @@ -68,7 +68,7 @@ /* rotate next bit into bottom bit of reg */ #define getnextb(reg) addc. bits,bits,bits; beql- get32; adde reg,reg,reg -get32: // IN: CArry set +get32: // IN: Carry set // fetch 4 bytes unaligned and LITTLE ENDIAN #if 0 /*{ clean; but 4 instr larger, and 3 cycles longer */ lbz bits,1(src) // lo8 @@ -85,10 +85,10 @@ get32: // IN: CArry set addi src,src,4 #endif /*}*/ - adde bits,bits,bits // shift in CArry + adde bits,bits,bits // shift in Carry sldi bits,bits,32-1 // left justify 33-bit result of 'adde' cmpld bits,hibit // cr0 for jnextb - addc bits,bits,bits // CArry for getnextb + addc bits,bits,bits // Carry for getnextb ret lit_n2e: @@ -108,14 +108,14 @@ getoff_n2e: getnextb(off) jnextb0n off_n2e - addic. off,off,-3 // CArry set [and ignored], but no 'addi.' + addic. off,off,-3 // Carry set [and ignored], but no 'addi.' li len,0 blt- offprev_n2e // (off < 3) ==> (2==off) ==> use previous lbzu t1,1(src) sldi off,off,32+8 sradi off,off,32 // net: off<<=8, and sign extend 32==>64 nor. disp,off,t1 // disp = -(1+ (off|t1)); - sradi disp,disp,1 // shift off low bit (sets CArry; ignored) + sradi disp,disp,1 // shift off low bit (sets Carry; ignored) beq- eof_nrv andi. t1,t1,1 // complement of low bit of unshifted disp beq+ lenlast_n2e // low bit was 1 @@ -135,7 +135,7 @@ len_n2e: lenlast_n2e: getnextb(len) // 0,1,2,3 gotlen_n2e: - subfic t1,disp,(~0)+(-0x500) // want CArry only + subfic t1,disp,(~0)+(-0x500) // want Carry only addi len,len,2 addze len,len // len += (disp < -0x500); diff --git a/src/stub/src/powerpc-darwin.macho-fold.S b/src/stub/src/powerpc-darwin.macho-fold.S index bb09caad..ef26dead 100644 --- a/src/stub/src/powerpc-darwin.macho-fold.S +++ b/src/stub/src/powerpc-darwin.macho-fold.S @@ -84,7 +84,7 @@ L100: lwz r0, srr0(a0); mtctr r0 # entry address /* Next 3 lines probably are not needed, but ... */ lwz r0, reg_cr(a0); mtcr r0 # condition code - lwz r0,reg_xer(a0); mtxer r0 # extended error reg (CArry, etc.) + lwz r0,reg_xer(a0); mtxer r0 # extended error reg (Carry, etc.) lwz r0, reg_lr(a0); mtlr r0 # link register lmw 4,4*4+reg0(3) # reg 4 thru 31 diff --git a/src/stub/src/powerpc64-darwin.macho-fold.S b/src/stub/src/powerpc64-darwin.macho-fold.S index 98f9a930..243b00ce 100644 --- a/src/stub/src/powerpc64-darwin.macho-fold.S +++ b/src/stub/src/powerpc64-darwin.macho-fold.S @@ -85,7 +85,7 @@ L100: lwz r0, srr0(a0); mtctr r0 # entry address /* Next 3 lines probably are not needed, but ... */ lwz r0, reg_cr(a0); mtcr r0 # condition code - lwz r0,reg_xer(a0); mtxer r0 # extended error reg (CArry, etc.) + lwz r0,reg_xer(a0); mtxer r0 # extended error reg (Carry, etc.) lwz r0, reg_lr(a0); mtlr r0 # link register lmw 4,4*4+reg0(3) # reg 4 thru 31