From 728302aad1527d05389461fa6f73c0c5f46a989a Mon Sep 17 00:00:00 2001 From: Andrew Jackson Date: Wed, 4 Nov 2026 16:22:09 -0600 Subject: [PATCH 01/12] feat: tsan build --- .github/workflows/ci.yml | 8 ++++++++ examples/hello/Makefile | 2 ++ examples/hello/src/hello.c | 21 +++++++++++++++++++++ nix/postgresql/default.nix | 20 +++++++++++++++++--- nix/postgresql/generic.nix | 4 +++- nix/xpg.nix | 5 +++++ 6 files changed, 56 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 892a3da..0c0b029 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -130,6 +130,14 @@ jobs: # expected error code not found (HELLO_OOB_WRITE=1 nix run .#xpg${{ matrix.pg-version }} -- --cassert -v ${{ matrix.pg-version }} test 2>&1 || true) | awk '/SUMMARY: AddressSanitizer: heap-buffer-overflow/ { found=1 } { print } END { if (!found) exit 1 }' + - name: Test TSAN reporting + run: | + cd examples/hello + # run test with cassert and injected OOB_WRITE error, print all stdout but exit non zero if + # expected error code not found + (HELLO_THREAD_DATA_RACE=1 nix run .#xpg${{ matrix.pg-version }} -- --tsan -v ${{ matrix.pg-version }} test 2>&1 || true) | awk '/WARNING: ThreadSanitizer: data race/ { found=1 } { print } END { if (!found) exit 1 }' + + - if: ${{ failure() }} run: | cd examples/hello diff --git a/examples/hello/Makefile b/examples/hello/Makefile index 17b955d..3ce234a 100644 --- a/examples/hello/Makefile +++ b/examples/hello/Makefile @@ -19,6 +19,8 @@ endif UNAME_S := $(shell uname -s) +SHLIB_LINK = -lpthread + ifeq ($(UNAME_S),Darwin) SHARED_EXT := dylib else diff --git a/examples/hello/src/hello.c b/examples/hello/src/hello.c index a7b7714..d8068ba 100644 --- a/examples/hello/src/hello.c +++ b/examples/hello/src/hello.c @@ -1,4 +1,14 @@ #include "pg_prelude.h" +#include + + +static int Global; + +static void *Thread1(void *x) { + Global = 42; + return x; +} + PG_MODULE_MAGIC; @@ -9,6 +19,7 @@ Datum hello(PG_FUNCTION_ARGS){ StringInfoData buf; initStringInfo(&buf); + // ASAN should flag this if (getenv("HELLO_OOB_WRITE")) { char *buf2 = (char *)malloc(4); @@ -22,6 +33,16 @@ Datum hello(PG_FUNCTION_ARGS){ printf("%d\n", *i); } + // TSAN should flag this + if (getenv("HELLO_THREAD_DATA_RACE")) { + pthread_t t; + pthread_create(&t, NULL, Thread1, NULL); + Global = 43; + pthread_join(t, NULL); + printf("%d\n", Global); + printf("%d\n", *((int *)Thread1(&Global))); + } + appendStringInfoString(&buf, "hello "); appendBinaryStringInfo(&buf, VARDATA_ANY(input), VARSIZE_ANY_EXHDR(input)); diff --git a/nix/postgresql/default.nix b/nix/postgresql/default.nix index 4e51c5a..b8ae5bc 100644 --- a/nix/postgresql/default.nix +++ b/nix/postgresql/default.nix @@ -21,17 +21,17 @@ let }; mkAttributes = - { jitSupport, cassertSupport }: + { jitSupport, cassertSupport, tsanSupport}: self.lib.mapAttrs' ( version: path: let - suffixes = self.lib.optional cassertSupport "cassert" ++ self.lib.optional jitSupport "jit"; + suffixes = self.lib.optional cassertSupport "cassert" ++ self.lib.optional jitSupport "jit" ++ self.lib.optional tsanSupport "tsan"; attrName = version + self.lib.optionalString (suffixes != [ ]) ("_" + self.lib.concatStringsSep "_" suffixes); in self.lib.nameValuePair attrName ( import path { - inherit jitSupport cassertSupport self; + inherit jitSupport cassertSupport tsanSupport self; } ) ) versions; @@ -41,16 +41,30 @@ in (mkAttributes { jitSupport = false; cassertSupport = false; + tsanSupport = false; }) // (mkAttributes { jitSupport = true; cassertSupport = false; + tsanSupport = false; }) // (mkAttributes { jitSupport = false; cassertSupport = true; + tsanSupport = false; }) // (mkAttributes { jitSupport = true; cassertSupport = true; + tsanSupport = false; +}) +// (mkAttributes { + jitSupport = true; + cassertSupport = false; + tsanSupport = true; +}) +// (mkAttributes { + jitSupport = false; + cassertSupport = false; + tsanSupport = true; }) diff --git a/nix/postgresql/generic.nix b/nix/postgresql/generic.nix index ed64e16..3208c58 100644 --- a/nix/postgresql/generic.nix +++ b/nix/postgresql/generic.nix @@ -54,6 +54,7 @@ let # JIT / assertions jitSupport, cassertSupport ? false, + tsanSupport ? false, nukeReferences, patchelf, llvmPackages, @@ -84,7 +85,7 @@ let in stdenv'.mkDerivation (finalAttrs: { inherit version; - pname = pname + lib.optionalString jitSupport "-jit" + lib.optionalString cassertSupport "-cassert"; + pname = pname + lib.optionalString jitSupport "-jit" + lib.optionalString cassertSupport "-cassert" + lib.optionalString tsanSupport "-tsan"; src = fetchurl { url = "mirror://postgresql/source/v${version}/${pname}-${version}.tar.bz2"; @@ -146,6 +147,7 @@ let "" + lib.optionalString cassertSupport "-fsanitize=undefined -fno-sanitize-recover=all -fno-omit-frame-pointer " + lib.optionalString (cassertSupport && stdenv.isDarwin) "-fno-sanitize=function" + + lib.optionalString (tsanSupport && stdenv'.isLinux) "-fsanitize=thread -fno-sanitize-recover=all" # TODO: compiling with clang on darwin with -fsanitize=address results in a binary # that never returns and pins at 100% CPU saturation of a single core. Possibly # revisit the below if this ever gets fixed diff --git a/nix/xpg.nix b/nix/xpg.nix index 733a93b..0d0a6ef 100644 --- a/nix/xpg.nix +++ b/nix/xpg.nix @@ -34,6 +34,7 @@ # Disabling this halves the PostgreSQL closure for consumers (e.g. CI) that # never pass `--cassert`. cassert ? true, + tsan ? false, }: let isLinux = stdenv.isLinux; @@ -64,6 +65,9 @@ let export UBSAN_OPTIONS="print_stacktrace=1:disable_coredump=0:abort_on_error=1:verbosity=2" export ASAN_OPTIONS="print_stacktrace=1:disable_coredump=0:abort_on_error=1:detect_leaks=0:detect_stack_use_after_return=0" + elif [ "$_arg_tsan" = on ]; then + export PATH=${ourPg."postgresql_${v}_tsan"}/bin:"$PATH" + export TSAN_OPTIONS="halt_on_error=1" else export PATH=${ourPg."postgresql_${v}"}/bin:"$PATH" fi @@ -97,6 +101,7 @@ let "ARG_OPTIONAL_SINGLE([options], [o], [Options for the database cluster],)" "ARG_OPTIONAL_SINGLE([init-options], [], [Options for the initialization of pgbench],)" "ARG_OPTIONAL_BOOLEAN([cassert], [], [Use the cassert-enabled PostgreSQL build])" + "ARG_OPTIONAL_BOOLEAN([tsan], [], [Use the thread sanitizer PostgreSQL build])" "ARG_OPTIONAL_SINGLE([commit], [], [Run the command in a new git worktree and check out ])" "ARG_TYPE_GROUP_SET([VERSION], [VERSION], [version], [${builtins.concatStringsSep "," versions}])" "ARG_LEFTOVERS([psql arguments])" From ee30d799f47ad7d1852b7c3f0b87e6feee108a92 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 31 Oct 2026 10:53:49 +0000 Subject: [PATCH 02/12] fix ci --- .github/workflows/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0c0b029..aeb27b4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -133,8 +133,7 @@ jobs: - name: Test TSAN reporting run: | cd examples/hello - # run test with cassert and injected OOB_WRITE error, print all stdout but exit non zero if - # expected error code not found + rm -rf ./build-{{ matrix.pg-version }} (HELLO_THREAD_DATA_RACE=1 nix run .#xpg${{ matrix.pg-version }} -- --tsan -v ${{ matrix.pg-version }} test 2>&1 || true) | awk '/WARNING: ThreadSanitizer: data race/ { found=1 } { print } END { if (!found) exit 1 }' From 8928911676b53aef5cbd655bdd720514bec85f7b Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 31 Oct 2026 10:57:22 +0000 Subject: [PATCH 03/12] attempt to fix pg builds --- nix/postgresql/generic.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nix/postgresql/generic.nix b/nix/postgresql/generic.nix index 3208c58..0475783 100644 --- a/nix/postgresql/generic.nix +++ b/nix/postgresql/generic.nix @@ -147,7 +147,7 @@ let "" + lib.optionalString cassertSupport "-fsanitize=undefined -fno-sanitize-recover=all -fno-omit-frame-pointer " + lib.optionalString (cassertSupport && stdenv.isDarwin) "-fno-sanitize=function" - + lib.optionalString (tsanSupport && stdenv'.isLinux) "-fsanitize=thread -fno-sanitize-recover=all" + + lib.optionalString (tsanSupport && atLeast "14" && stdenv'.isLinux) "-fsanitize=thread -fno-sanitize-recover=all" # TODO: compiling with clang on darwin with -fsanitize=address results in a binary # that never returns and pins at 100% CPU saturation of a single core. Possibly # revisit the below if this ever gets fixed From 4b563de3e27ad4717705cfcf413294a3b75b60cc Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 31 Oct 2026 10:58:51 +0000 Subject: [PATCH 04/12] chore: nix fmt --- nix/postgresql/default.nix | 18 +++++++++++++++--- nix/postgresql/generic.nix | 10 ++++++++-- nix/xpg.nix | 36 ++++++++++++++++++------------------ 3 files changed, 41 insertions(+), 23 deletions(-) diff --git a/nix/postgresql/default.nix b/nix/postgresql/default.nix index b8ae5bc..d00b9d8 100644 --- a/nix/postgresql/default.nix +++ b/nix/postgresql/default.nix @@ -21,17 +21,29 @@ let }; mkAttributes = - { jitSupport, cassertSupport, tsanSupport}: + { + jitSupport, + cassertSupport, + tsanSupport, + }: self.lib.mapAttrs' ( version: path: let - suffixes = self.lib.optional cassertSupport "cassert" ++ self.lib.optional jitSupport "jit" ++ self.lib.optional tsanSupport "tsan"; + suffixes = + self.lib.optional cassertSupport "cassert" + ++ self.lib.optional jitSupport "jit" + ++ self.lib.optional tsanSupport "tsan"; attrName = version + self.lib.optionalString (suffixes != [ ]) ("_" + self.lib.concatStringsSep "_" suffixes); in self.lib.nameValuePair attrName ( import path { - inherit jitSupport cassertSupport tsanSupport self; + inherit + jitSupport + cassertSupport + tsanSupport + self + ; } ) ) versions; diff --git a/nix/postgresql/generic.nix b/nix/postgresql/generic.nix index 0475783..24425e0 100644 --- a/nix/postgresql/generic.nix +++ b/nix/postgresql/generic.nix @@ -85,7 +85,11 @@ let in stdenv'.mkDerivation (finalAttrs: { inherit version; - pname = pname + lib.optionalString jitSupport "-jit" + lib.optionalString cassertSupport "-cassert" + lib.optionalString tsanSupport "-tsan"; + pname = + pname + + lib.optionalString jitSupport "-jit" + + lib.optionalString cassertSupport "-cassert" + + lib.optionalString tsanSupport "-tsan"; src = fetchurl { url = "mirror://postgresql/source/v${version}/${pname}-${version}.tar.bz2"; @@ -147,7 +151,9 @@ let "" + lib.optionalString cassertSupport "-fsanitize=undefined -fno-sanitize-recover=all -fno-omit-frame-pointer " + lib.optionalString (cassertSupport && stdenv.isDarwin) "-fno-sanitize=function" - + lib.optionalString (tsanSupport && atLeast "14" && stdenv'.isLinux) "-fsanitize=thread -fno-sanitize-recover=all" + + lib.optionalString ( + tsanSupport && atLeast "14" && stdenv'.isLinux + ) "-fsanitize=thread -fno-sanitize-recover=all" # TODO: compiling with clang on darwin with -fsanitize=address results in a binary # that never returns and pins at 100% CPU saturation of a single core. Possibly # revisit the below if this ever gets fixed diff --git a/nix/xpg.nix b/nix/xpg.nix index 0d0a6ef..31c7196 100644 --- a/nix/xpg.nix +++ b/nix/xpg.nix @@ -53,24 +53,24 @@ let ${ if cassert then '' - if [ "$_arg_cassert" = on ]; then - export PATH=${ourPg."postgresql_${v}_cassert"}/bin:"$PATH" - - # See below links - # TODO: detect_stack_use_after_return in ASAN_OPTIONS can be removed after - # below patch lands and is backported, thought it will still need to - # remain for EOL'd versions - # https://www.postgresql.org/message-id/flat/2kk4z4odvuyrg7qlwjd7ft4eron4cle4btb33v4qatgsdkayir%40gj6e62rgsel4 - # https://github.com/postgres/postgres/blob/51ae21aa313bb6b79ad914920279cd0d89e92220/.github/workflows/pg-ci.yml#L464 - - export UBSAN_OPTIONS="print_stacktrace=1:disable_coredump=0:abort_on_error=1:verbosity=2" - export ASAN_OPTIONS="print_stacktrace=1:disable_coredump=0:abort_on_error=1:detect_leaks=0:detect_stack_use_after_return=0" - elif [ "$_arg_tsan" = on ]; then - export PATH=${ourPg."postgresql_${v}_tsan"}/bin:"$PATH" - export TSAN_OPTIONS="halt_on_error=1" - else - export PATH=${ourPg."postgresql_${v}"}/bin:"$PATH" - fi + if [ "$_arg_cassert" = on ]; then + export PATH=${ourPg."postgresql_${v}_cassert"}/bin:"$PATH" + + # See below links + # TODO: detect_stack_use_after_return in ASAN_OPTIONS can be removed after + # below patch lands and is backported, thought it will still need to + # remain for EOL'd versions + # https://www.postgresql.org/message-id/flat/2kk4z4odvuyrg7qlwjd7ft4eron4cle4btb33v4qatgsdkayir%40gj6e62rgsel4 + # https://github.com/postgres/postgres/blob/51ae21aa313bb6b79ad914920279cd0d89e92220/.github/workflows/pg-ci.yml#L464 + + export UBSAN_OPTIONS="print_stacktrace=1:disable_coredump=0:abort_on_error=1:verbosity=2" + export ASAN_OPTIONS="print_stacktrace=1:disable_coredump=0:abort_on_error=1:detect_leaks=0:detect_stack_use_after_return=0" + elif [ "$_arg_tsan" = on ]; then + export PATH=${ourPg."postgresql_${v}_tsan"}/bin:"$PATH" + export TSAN_OPTIONS="halt_on_error=1" + else + export PATH=${ourPg."postgresql_${v}"}/bin:"$PATH" + fi '' else '' From cc76e1f0beab7aee40f54d5d36952929c5617234 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 31 Oct 2026 11:03:39 +0000 Subject: [PATCH 05/12] fix: CI --- nix/postgresql/generic.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nix/postgresql/generic.nix b/nix/postgresql/generic.nix index 24425e0..8365191 100644 --- a/nix/postgresql/generic.nix +++ b/nix/postgresql/generic.nix @@ -152,7 +152,7 @@ let + lib.optionalString cassertSupport "-fsanitize=undefined -fno-sanitize-recover=all -fno-omit-frame-pointer " + lib.optionalString (cassertSupport && stdenv.isDarwin) "-fno-sanitize=function" + lib.optionalString ( - tsanSupport && atLeast "14" && stdenv'.isLinux + tsanSupport && atLeast "16" && stdenv'.isLinux ) "-fsanitize=thread -fno-sanitize-recover=all" # TODO: compiling with clang on darwin with -fsanitize=address results in a binary # that never returns and pins at 100% CPU saturation of a single core. Possibly From dfd11c99ca873cba0313dd6c37e30a1ed356841c Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 31 Oct 2026 11:06:37 +0000 Subject: [PATCH 06/12] cool --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aeb27b4..7716916 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -131,6 +131,7 @@ jobs: (HELLO_OOB_WRITE=1 nix run .#xpg${{ matrix.pg-version }} -- --cassert -v ${{ matrix.pg-version }} test 2>&1 || true) | awk '/SUMMARY: AddressSanitizer: heap-buffer-overflow/ { found=1 } { print } END { if (!found) exit 1 }' - name: Test TSAN reporting + if: matrix.pg-version >= 17 run: | cd examples/hello rm -rf ./build-{{ matrix.pg-version }} From 734d31b26ff84f869dc1a0f4d3493eb002e578c1 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 31 Oct 2026 11:15:43 +0000 Subject: [PATCH 07/12] cool --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7716916..918eb3c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -135,6 +135,7 @@ jobs: run: | cd examples/hello rm -rf ./build-{{ matrix.pg-version }} + make clean (HELLO_THREAD_DATA_RACE=1 nix run .#xpg${{ matrix.pg-version }} -- --tsan -v ${{ matrix.pg-version }} test 2>&1 || true) | awk '/WARNING: ThreadSanitizer: data race/ { found=1 } { print } END { if (!found) exit 1 }' From a2f76f3c9a0275b6eb0a2919df33cd310dc3cfc7 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 31 Oct 2026 11:27:07 +0000 Subject: [PATCH 08/12] cool --- .github/workflows/ci.yml | 3 +-- flake.nix | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 918eb3c..2987089 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -76,8 +76,7 @@ jobs: - name: Install GCC run: | - nix profile install nixpkgs#gcc15 - echo "$HOME/.nix-profile/bin" >> "$GITHUB_PATH" + nix develop . # TODO: Currently builds are not fully hermetic. We will care about the state of the machine # until we can invest in making this repo fully hermetic diff --git a/flake.nix b/flake.nix index 3c62a21..f4f5940 100644 --- a/flake.nix +++ b/flake.nix @@ -35,6 +35,25 @@ pkgs.nixfmt-tree ); + devShells = forAllSystems ( + system: + let + pkgs = import nixpkgs { inherit system; }; + xpgPkgs = import ./nix/packages.nix { inherit pkgs; }; + in + { +default = pkgs.mkShell { + buildInputs = [ + pkgs.gcc15 + ]; + shellHook = '' + export HISTFILE=.history + ''; +}; + + } + ); + packages = forAllSystems ( system: let From baab140f8ca5ffb4516cdd5f4b0237cbc1cb34b4 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 31 Oct 2026 11:28:30 +0000 Subject: [PATCH 09/12] cool --- .github/workflows/ci.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2987089..e967159 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -82,6 +82,7 @@ jobs: # until we can invest in making this repo fully hermetic - name: Print state run: | + nix develop . gcc --version ulimit -s cat /etc/os-release @@ -89,11 +90,13 @@ jobs: - name: Build postgres extension run: | + nix develop . cd examples/hello nix run .#xpg${{ matrix.pg-version }} -- build - name: Test postgres extension run: | + nix develop . cd examples/hello nix run .#xpg${{ matrix.pg-version }} -- psql -v ON_ERROR_STOP=1 -c "SELECT true;" nix run .#xpg${{ matrix.pg-version }} -- psql -v ON_ERROR_STOP=1 -c "SELECT true;" @@ -115,6 +118,7 @@ jobs: - name: Test UBSAN reporting run: | + nix develop . cd examples/hello rm -rf ./build-{{ matrix.pg-version }} @@ -124,6 +128,7 @@ jobs: - name: Test ASAN reporting run: | + nix develop . cd examples/hello # run test with cassert and injected OOB_WRITE error, print all stdout but exit non zero if # expected error code not found @@ -132,6 +137,7 @@ jobs: - name: Test TSAN reporting if: matrix.pg-version >= 17 run: | + nix develop . cd examples/hello rm -rf ./build-{{ matrix.pg-version }} make clean From 439eb08b92fb2184740ef05b23b00110ced78666 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 31 Oct 2026 11:39:21 +0000 Subject: [PATCH 10/12] hardcode references --- nix/xpg.nix | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/nix/xpg.nix b/nix/xpg.nix index 31c7196..290aab7 100644 --- a/nix/xpg.nix +++ b/nix/xpg.nix @@ -7,6 +7,9 @@ findutils, entr, lcov, + gcc, + gnumake, + llvm, gnused, gdb, writeText, @@ -54,7 +57,7 @@ let if cassert then '' if [ "$_arg_cassert" = on ]; then - export PATH=${ourPg."postgresql_${v}_cassert"}/bin:"$PATH" + export PATH=${gnumake}/bin:${gcc}/bin:${ourPg."postgresql_${v}_cassert"}/bin:"$PATH" # See below links # TODO: detect_stack_use_after_return in ASAN_OPTIONS can be removed after @@ -163,7 +166,7 @@ let # commands that require the build ready case "$_arg_operation" in test) - make build TEST=1 1>&2 + ${gnumake}/bin/make build TEST=1 1>&2 ;; coverage) @@ -171,11 +174,11 @@ let rm -rf "$BUILD_DIR"/*.o "$BUILD_DIR"/*.so fi - make build TEST=1 COVERAGE=1 1>&2 + ${gnumake}/bin/make build TEST=1 COVERAGE=1 1>&2 ;; test-core) - make build TEST_CORE=1 1>&2 + ${gnumake}/bin/make build TEST_CORE=1 1>&2 ;; gdb) @@ -183,7 +186,7 @@ let ;; *) - make build 1>&2 + ${gnumake}/bin/make build 1>&2 ;; esac @@ -272,17 +275,17 @@ let ;; test-core) - make test-core + ${gnumake}/bin/make test-core ;; test) - make test + ${gnumake}/bin/make test ;; coverage) coverage_out_dir=$BUILD_DIR/coverage_html - make test + ${gnumake}/bin/make test ${lcov}/bin/lcov --capture --directory . --output-file "$COVERAGE_INFO" From d10d2ab695cc34bd38b60e1fdda9e0e8615c1b21 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 31 Oct 2026 15:30:24 +0000 Subject: [PATCH 11/12] fix: ci --- nix/xpg.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nix/xpg.nix b/nix/xpg.nix index 290aab7..0b7140e 100644 --- a/nix/xpg.nix +++ b/nix/xpg.nix @@ -56,8 +56,8 @@ let ${ if cassert then '' - if [ "$_arg_cassert" = on ]; then export PATH=${gnumake}/bin:${gcc}/bin:${ourPg."postgresql_${v}_cassert"}/bin:"$PATH" + if [ "$_arg_cassert" = on ]; then # See below links # TODO: detect_stack_use_after_return in ASAN_OPTIONS can be removed after From 0af213b3b29c98bf20c51231d2d802f841bbe374 Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 31 Oct 2026 15:31:41 +0000 Subject: [PATCH 12/12] chore: nix fmt --- flake.nix | 18 +++++++++--------- nix/xpg.nix | 4 +++- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/flake.nix b/flake.nix index f4f5940..6e04df0 100644 --- a/flake.nix +++ b/flake.nix @@ -41,15 +41,15 @@ pkgs = import nixpkgs { inherit system; }; xpgPkgs = import ./nix/packages.nix { inherit pkgs; }; in - { -default = pkgs.mkShell { - buildInputs = [ - pkgs.gcc15 - ]; - shellHook = '' - export HISTFILE=.history - ''; -}; + { + default = pkgs.mkShell { + buildInputs = [ + pkgs.gcc15 + ]; + shellHook = '' + export HISTFILE=.history + ''; + }; } ); diff --git a/nix/xpg.nix b/nix/xpg.nix index 0b7140e..8210f07 100644 --- a/nix/xpg.nix +++ b/nix/xpg.nix @@ -56,7 +56,9 @@ let ${ if cassert then '' - export PATH=${gnumake}/bin:${gcc}/bin:${ourPg."postgresql_${v}_cassert"}/bin:"$PATH" + export PATH=${gnumake}/bin:${gcc}/bin:${ + ourPg."postgresql_${v}_cassert" + }/bin:"$PATH" if [ "$_arg_cassert" = on ]; then # See below links