From fe3dbed7a34de5b22844fdc8b5ca4946760c204b Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Wed, 12 Aug 2026 20:01:17 +1000 Subject: [PATCH 1/5] CI: install Pytest on FreeBSD in a more stable way MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This seems to have been how I should have configured this to begin with¹ instead of hard coding versions that go missing when packages are upgraded. This is adapted from commit dc1edfbae4bf065574786eb9b2984e875a5a8181 from Rumur.² ¹ https://www.freshports.org/devel/py-pytest/ ² https://github.com/Smattr/rumur/commit/dc1edfbae4bf065574786eb9b2984e875a5a8181 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7b6cb29..7173d35 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ jobs: set -u set -x uname -rms - pkg install -y cmake git python3 py311-pytest vim + pkg install -y cmake git python3 devel/py-pytest vim python3 --version git clone --no-checkout -- ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY} wd cd wd From b42d56c2f781f007601956af5705ecc4d802f220 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Wed, 12 Aug 2026 20:03:34 +1000 Subject: [PATCH 2/5] =?UTF-8?q?CI:=20upgrade=20Linux=20base=20image=20Ubun?= =?UTF-8?q?tu=2024.04=20=E2=86=92=2026.04?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7173d35..bf2edd3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,7 @@ on: jobs: freebsd13: name: FreeBSD - runs-on: ubuntu-24.04 + runs-on: ubuntu-26.04 steps: - uses: vmactions/freebsd-vm@7ca82f79fe3078fecded6d3a2bff094995447bbd with: @@ -36,7 +36,7 @@ jobs: linux: name: Linux - runs-on: ubuntu-24.04 + runs-on: ubuntu-26.04 env: DEBIAN_FRONTEND: noninteractive CFLAGS: -Werror -g -fno-omit-frame-pointer -fsanitize=address,undefined -fno-sanitize-recover=address,undefined @@ -56,7 +56,7 @@ jobs: linux_shared: name: Linux, shared libraries - runs-on: ubuntu-24.04 + runs-on: ubuntu-26.04 env: DEBIAN_FRONTEND: noninteractive CFLAGS: -Werror -g -fno-omit-frame-pointer -fsanitize=address,undefined -fno-sanitize-recover=address,undefined @@ -76,7 +76,7 @@ jobs: linux_release: name: Linux, release build - runs-on: ubuntu-24.04 + runs-on: ubuntu-26.04 env: DEBIAN_FRONTEND: noninteractive CFLAGS: -Werror -g -fno-omit-frame-pointer -fsanitize=address,undefined -fno-sanitize-recover=address,undefined From a06ddd3c8efdbe1e04649d4c79c0188a482f8898 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Wed, 12 Aug 2026 20:16:38 +1000 Subject: [PATCH 3/5] fix ignoring of EOF when encountered following a \r Clang Static Analyzer says: [MEDIUM] libvimcat/src/read.c:89:13: File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior [unix.Stream] int c = getc(f); ^ [MEDIUM] libvimcat/src/read.c:89:13: Read function called when stream is in EOF state. Function has no effect [unix.Stream] int c = getc(f); ^ [MEDIUM] libvimcat/src/read.c:105:15: File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior [unix.Stream] int n = getc(f); ^ [MEDIUM] libvimcat/src/read.c:105:15: Read function called when stream is in EOF state. Function has no effect [unix.Stream] int n = getc(f); ^ [MEDIUM] libvimcat/src/read.c:115:13: File position of the stream might be 'indeterminate' after a failed operation. Can cause undefined behavior [unix.Stream] if (ERROR(ungetc(n, f) == EOF)) { ^ Reported-by: Clang Static Analyzer 20.1.8 --- libvimcat/src/read.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/libvimcat/src/read.c b/libvimcat/src/read.c index d364ec9..0ac0c8a 100644 --- a/libvimcat/src/read.c +++ b/libvimcat/src/read.c @@ -103,7 +103,10 @@ static int get_extent(const char *filename, size_t limit, size_t *rows, // is this a Windows end of line? if (c == '\r') { int n = getc(f); - if (n == '\n') { + if (n == EOF) { + ++width; + break; + } else if (n == '\n') { ++lines; if (max_width < width) max_width = width; @@ -111,11 +114,9 @@ static int get_extent(const char *filename, size_t limit, size_t *rows, continue; } - if (n != EOF) { - if (ERROR(ungetc(n, f) == EOF)) { - rc = EIO; - goto done; - } + if (ERROR(ungetc(n, f) == EOF)) { + rc = EIO; + goto done; } } From 217e02fc317bb66d35a3360162639201201e58ac Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Wed, 12 Aug 2026 20:04:12 +1000 Subject: [PATCH 4/5] =?UTF-8?q?CI:=20upgrade=20analysis=20job=20Ubuntu=202?= =?UTF-8?q?4.04=20=E2=86=92=2026.04?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bf2edd3..01b1467 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -124,7 +124,7 @@ jobs: c_analysis: name: C analysis - runs-on: ubuntu-24.04 + runs-on: ubuntu-26.04 steps: - run: uname -rms - run: python3 --version From cd0548e4ee1392959c9faf6dadb6c896a1aa790c Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Wed, 12 Aug 2026 20:04:12 +1000 Subject: [PATCH 5/5] =?UTF-8?q?CI:=20upgrade=20Python=20formatting=20job?= =?UTF-8?q?=20Ubuntu=2022.04=20=E2=86=92=2026.04?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 01b1467..d469281 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -141,7 +141,7 @@ jobs: py_format: name: Python format - runs-on: ubuntu-22.04 + runs-on: ubuntu-26.04 env: DEBIAN_FRONTEND: noninteractive steps: