From 88f47b6a6e89f84ffc5048adfef8fdceec68d2dd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Oct 2026 07:18:49 +0000 Subject: [PATCH 1/7] Bump actions/checkout from 6.0.2 to 7.0.1 in /.github/workflows Bumps [actions/checkout](https://github.com/actions/checkout) from 6.0.2 to 7.0.1. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v6.0.2...3d3c42e5aac5ba805825da76410c181273ba90b1) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 7.0.1 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/ci-flux-artifacts.yml | 2 +- .github/workflows/ci-serial-arm64-artifacts.yml | 2 +- .github/workflows/ci-serial-x86-artifacts.yml | 2 +- .github/workflows/ci-slurm-artifacts.yml | 2 +- .github/workflows/ci-slurm-plugin-artifacts.yml | 2 +- .github/workflows/ci-slurm-srun-artifacts.yml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci-flux-artifacts.yml b/.github/workflows/ci-flux-artifacts.yml index d6bd5167..82182cbe 100644 --- a/.github/workflows/ci-flux-artifacts.yml +++ b/.github/workflows/ci-flux-artifacts.yml @@ -15,7 +15,7 @@ jobs: timeout-minutes: 20 steps: - name: Check out Spindle - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 - name: Setup Docker Compose uses: docker/setup-compose-action@16feee727cbdc83b6a014e6cc26fec4a79bcf30c diff --git a/.github/workflows/ci-serial-arm64-artifacts.yml b/.github/workflows/ci-serial-arm64-artifacts.yml index 0146a7be..de948aa6 100644 --- a/.github/workflows/ci-serial-arm64-artifacts.yml +++ b/.github/workflows/ci-serial-arm64-artifacts.yml @@ -15,7 +15,7 @@ jobs: timeout-minutes: 30 steps: - name: Check out Spindle - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 - name: Setup Docker Compose uses: docker/setup-compose-action@16feee727cbdc83b6a014e6cc26fec4a79bcf30c diff --git a/.github/workflows/ci-serial-x86-artifacts.yml b/.github/workflows/ci-serial-x86-artifacts.yml index 9f8db79e..2e181714 100644 --- a/.github/workflows/ci-serial-x86-artifacts.yml +++ b/.github/workflows/ci-serial-x86-artifacts.yml @@ -15,7 +15,7 @@ jobs: timeout-minutes: 20 steps: - name: Check out Spindle - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 - name: Setup Docker Compose uses: docker/setup-compose-action@16feee727cbdc83b6a014e6cc26fec4a79bcf30c diff --git a/.github/workflows/ci-slurm-artifacts.yml b/.github/workflows/ci-slurm-artifacts.yml index 38ee5b21..4db360bf 100644 --- a/.github/workflows/ci-slurm-artifacts.yml +++ b/.github/workflows/ci-slurm-artifacts.yml @@ -15,7 +15,7 @@ jobs: timeout-minutes: 20 steps: - name: Check out Spindle - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 - name: Setup Docker Compose uses: docker/setup-compose-action@16feee727cbdc83b6a014e6cc26fec4a79bcf30c diff --git a/.github/workflows/ci-slurm-plugin-artifacts.yml b/.github/workflows/ci-slurm-plugin-artifacts.yml index 3a1ee0c0..2c2ce64f 100644 --- a/.github/workflows/ci-slurm-plugin-artifacts.yml +++ b/.github/workflows/ci-slurm-plugin-artifacts.yml @@ -15,7 +15,7 @@ jobs: timeout-minutes: 20 steps: - name: Check out Spindle - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 - name: Setup Docker Compose uses: docker/setup-compose-action@16feee727cbdc83b6a014e6cc26fec4a79bcf30c diff --git a/.github/workflows/ci-slurm-srun-artifacts.yml b/.github/workflows/ci-slurm-srun-artifacts.yml index e12077c9..c9395af0 100644 --- a/.github/workflows/ci-slurm-srun-artifacts.yml +++ b/.github/workflows/ci-slurm-srun-artifacts.yml @@ -15,7 +15,7 @@ jobs: timeout-minutes: 20 steps: - name: Check out Spindle - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 - name: Setup Docker Compose uses: docker/setup-compose-action@16feee727cbdc83b6a014e6cc26fec4a79bcf30c From fbf5655b437b7720d3412fab4cc2957d3ff28dbd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Oct 2026 07:18:58 +0000 Subject: [PATCH 2/7] Bump docker/build-push-action from 7.3.0 to 7.4.0 in /.github/workflows Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 7.3.0 to 7.4.0. - [Release notes](https://github.com/docker/build-push-action/releases) - [Commits](https://github.com/docker/build-push-action/compare/53b7df96c91f9c12dcc8a07bcb9ccacbed38856a...c3c9e263c25d99ce0380d002d59b67737d91b0dc) --- updated-dependencies: - dependency-name: docker/build-push-action dependency-version: 7.4.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/container.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/container.yml b/.github/workflows/container.yml index 01e31022..1f323617 100644 --- a/.github/workflows/container.yml +++ b/.github/workflows/container.yml @@ -24,7 +24,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Build & Push Slurm Base Image - uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a + uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc with: context: ./containers/spindle-slurm-ubuntu/base platforms: linux/amd64 From abc107125713ad5010c7185ce5ff852706a481b0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Oct 2026 07:19:07 +0000 Subject: [PATCH 3/7] Bump docker/setup-buildx-action in /.github/workflows Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 4.3.0 to 4.4.1. - [Release notes](https://github.com/docker/setup-buildx-action/releases) - [Commits](https://github.com/docker/setup-buildx-action/compare/37fe631027851001ddb9b187196cc803df7f5f0e...f87e5991a6d7451dcb8d9637bfbc97413f497069) --- updated-dependencies: - dependency-name: docker/setup-buildx-action dependency-version: 4.4.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/container.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/container.yml b/.github/workflows/container.yml index 01e31022..38a4a6cf 100644 --- a/.github/workflows/container.yml +++ b/.github/workflows/container.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e + uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 - name: Login to GitHub Container Registry uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f From f564b0c44096a4ce0573526a9abf3678f455c559 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Oct 2026 07:19:15 +0000 Subject: [PATCH 4/7] Bump docker/login-action from 4.2.0 to 4.6.0 in /.github/workflows Bumps [docker/login-action](https://github.com/docker/login-action) from 4.2.0 to 4.6.0. - [Release notes](https://github.com/docker/login-action/releases) - [Commits](https://github.com/docker/login-action/compare/v4.2.0...dbcb813823bdd20940b903addbd779551569679f) --- updated-dependencies: - dependency-name: docker/login-action dependency-version: 4.6.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/ci-slurm-artifacts.yml | 2 +- .github/workflows/ci-slurm-plugin-artifacts.yml | 2 +- .github/workflows/ci-slurm-srun-artifacts.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-slurm-artifacts.yml b/.github/workflows/ci-slurm-artifacts.yml index 38ee5b21..e90fbfc1 100644 --- a/.github/workflows/ci-slurm-artifacts.yml +++ b/.github/workflows/ci-slurm-artifacts.yml @@ -24,7 +24,7 @@ jobs: - name: Login to GitHub Container Registry if: ${{ !env.ACT }} - uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee + uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f with: registry: ghcr.io username: ${{ github.actor }} diff --git a/.github/workflows/ci-slurm-plugin-artifacts.yml b/.github/workflows/ci-slurm-plugin-artifacts.yml index 3a1ee0c0..14d81319 100644 --- a/.github/workflows/ci-slurm-plugin-artifacts.yml +++ b/.github/workflows/ci-slurm-plugin-artifacts.yml @@ -24,7 +24,7 @@ jobs: - name: Login to GitHub Container Registry if: ${{ !env.ACT }} - uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee + uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f with: registry: ghcr.io username: ${{ github.actor }} diff --git a/.github/workflows/ci-slurm-srun-artifacts.yml b/.github/workflows/ci-slurm-srun-artifacts.yml index e12077c9..78a15b95 100644 --- a/.github/workflows/ci-slurm-srun-artifacts.yml +++ b/.github/workflows/ci-slurm-srun-artifacts.yml @@ -24,7 +24,7 @@ jobs: - name: Login to GitHub Container Registry if: ${{ !env.ACT }} - uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee + uses: docker/login-action@dbcb813823bdd20940b903addbd779551569679f with: registry: ghcr.io username: ${{ github.actor }} From a8fc599d2157272b4ae81110f60b3ac4eb48ceb5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Oct 2026 07:19:20 +0000 Subject: [PATCH 5/7] Bump docker/setup-compose-action in /.github/workflows Bumps [docker/setup-compose-action](https://github.com/docker/setup-compose-action) from 2.2.0 to 2.4.0. - [Release notes](https://github.com/docker/setup-compose-action/releases) - [Commits](https://github.com/docker/setup-compose-action/compare/v2.2.0...54042514f505b273907334ae2b9cdbb9a0213c1a) --- updated-dependencies: - dependency-name: docker/setup-compose-action dependency-version: 2.4.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/ci-flux-artifacts.yml | 2 +- .github/workflows/ci-serial-arm64-artifacts.yml | 2 +- .github/workflows/ci-serial-x86-artifacts.yml | 2 +- .github/workflows/ci-slurm-artifacts.yml | 2 +- .github/workflows/ci-slurm-plugin-artifacts.yml | 2 +- .github/workflows/ci-slurm-srun-artifacts.yml | 2 +- .github/workflows/ci.yml | 12 ++++++------ 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci-flux-artifacts.yml b/.github/workflows/ci-flux-artifacts.yml index d6bd5167..f2512382 100644 --- a/.github/workflows/ci-flux-artifacts.yml +++ b/.github/workflows/ci-flux-artifacts.yml @@ -18,7 +18,7 @@ jobs: uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd - name: Setup Docker Compose - uses: docker/setup-compose-action@16feee727cbdc83b6a014e6cc26fec4a79bcf30c + uses: docker/setup-compose-action@54042514f505b273907334ae2b9cdbb9a0213c1a with: version: latest diff --git a/.github/workflows/ci-serial-arm64-artifacts.yml b/.github/workflows/ci-serial-arm64-artifacts.yml index 0146a7be..c41e7d84 100644 --- a/.github/workflows/ci-serial-arm64-artifacts.yml +++ b/.github/workflows/ci-serial-arm64-artifacts.yml @@ -18,7 +18,7 @@ jobs: uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd - name: Setup Docker Compose - uses: docker/setup-compose-action@16feee727cbdc83b6a014e6cc26fec4a79bcf30c + uses: docker/setup-compose-action@54042514f505b273907334ae2b9cdbb9a0213c1a with: version: latest diff --git a/.github/workflows/ci-serial-x86-artifacts.yml b/.github/workflows/ci-serial-x86-artifacts.yml index 9f8db79e..f399bed2 100644 --- a/.github/workflows/ci-serial-x86-artifacts.yml +++ b/.github/workflows/ci-serial-x86-artifacts.yml @@ -18,7 +18,7 @@ jobs: uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd - name: Setup Docker Compose - uses: docker/setup-compose-action@16feee727cbdc83b6a014e6cc26fec4a79bcf30c + uses: docker/setup-compose-action@54042514f505b273907334ae2b9cdbb9a0213c1a with: version: latest diff --git a/.github/workflows/ci-slurm-artifacts.yml b/.github/workflows/ci-slurm-artifacts.yml index 38ee5b21..f50d4058 100644 --- a/.github/workflows/ci-slurm-artifacts.yml +++ b/.github/workflows/ci-slurm-artifacts.yml @@ -18,7 +18,7 @@ jobs: uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd - name: Setup Docker Compose - uses: docker/setup-compose-action@16feee727cbdc83b6a014e6cc26fec4a79bcf30c + uses: docker/setup-compose-action@54042514f505b273907334ae2b9cdbb9a0213c1a with: version: latest diff --git a/.github/workflows/ci-slurm-plugin-artifacts.yml b/.github/workflows/ci-slurm-plugin-artifacts.yml index 3a1ee0c0..97b16c81 100644 --- a/.github/workflows/ci-slurm-plugin-artifacts.yml +++ b/.github/workflows/ci-slurm-plugin-artifacts.yml @@ -18,7 +18,7 @@ jobs: uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd - name: Setup Docker Compose - uses: docker/setup-compose-action@16feee727cbdc83b6a014e6cc26fec4a79bcf30c + uses: docker/setup-compose-action@54042514f505b273907334ae2b9cdbb9a0213c1a with: version: latest diff --git a/.github/workflows/ci-slurm-srun-artifacts.yml b/.github/workflows/ci-slurm-srun-artifacts.yml index e12077c9..b8b6349b 100644 --- a/.github/workflows/ci-slurm-srun-artifacts.yml +++ b/.github/workflows/ci-slurm-srun-artifacts.yml @@ -18,7 +18,7 @@ jobs: uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd - name: Setup Docker Compose - uses: docker/setup-compose-action@16feee727cbdc83b6a014e6cc26fec4a79bcf30c + uses: docker/setup-compose-action@54042514f505b273907334ae2b9cdbb9a0213c1a with: version: latest diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6f17c6ee..87073931 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 - name: Setup Docker Compose - uses: docker/setup-compose-action@4eb059ff7f16592f9c84d5ca339c53cb7c5064e2 + uses: docker/setup-compose-action@54042514f505b273907334ae2b9cdbb9a0213c1a with: version: latest @@ -81,7 +81,7 @@ jobs: uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 - name: Setup Docker Compose - uses: docker/setup-compose-action@4eb059ff7f16592f9c84d5ca339c53cb7c5064e2 + uses: docker/setup-compose-action@54042514f505b273907334ae2b9cdbb9a0213c1a with: version: latest @@ -134,7 +134,7 @@ jobs: uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 - name: Setup Docker Compose - uses: docker/setup-compose-action@4eb059ff7f16592f9c84d5ca339c53cb7c5064e2 + uses: docker/setup-compose-action@54042514f505b273907334ae2b9cdbb9a0213c1a with: version: latest @@ -199,7 +199,7 @@ jobs: uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 - name: Setup Docker Compose - uses: docker/setup-compose-action@4eb059ff7f16592f9c84d5ca339c53cb7c5064e2 + uses: docker/setup-compose-action@54042514f505b273907334ae2b9cdbb9a0213c1a with: version: latest @@ -266,7 +266,7 @@ jobs: uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 - name: Setup Docker Compose - uses: docker/setup-compose-action@4eb059ff7f16592f9c84d5ca339c53cb7c5064e2 + uses: docker/setup-compose-action@54042514f505b273907334ae2b9cdbb9a0213c1a with: version: latest @@ -324,7 +324,7 @@ jobs: uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 - name: Setup Docker Compose - uses: docker/setup-compose-action@4eb059ff7f16592f9c84d5ca339c53cb7c5064e2 + uses: docker/setup-compose-action@54042514f505b273907334ae2b9cdbb9a0213c1a with: version: latest From a268a2c1ed683e2b35dfcb4a38842e89bd6287fa Mon Sep 17 00:00:00 2001 From: Nicholas Chaimov Date: Wed, 30 Sep 2026 13:48:47 -0700 Subject: [PATCH 6/7] Add test for closefrom, close_range --- testsuite/Makefile.am | 7 ++- testsuite/Makefile.in | 12 +++-- testsuite/close_range_test.c | 90 ++++++++++++++++++++++++++++++++++++ testsuite/runTests_template | 3 ++ 4 files changed, 106 insertions(+), 6 deletions(-) create mode 100644 testsuite/close_range_test.c diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am index 19a04129..6385a998 100644 --- a/testsuite/Makefile.am +++ b/testsuite/Makefile.am @@ -1,7 +1,7 @@ noinst_PROGRAMS = libgenerator ABS_TEST_DIR = $(abspath $(top_builddir)/testsuite) -BUILT_SOURCES = libtest10.so libtest11.so libtest12.so libtest13.so libtest14.so libtest15.so libtest16.so libtest17.so libtest18.so libtest19.so libtest20.so libtest50.so libtest100.so libtest500.so libtest1000.so libtest2000.so libtest4000.so libtest6000.so libtest8000.so libtest10000.so libtls1.c libtls2.c libtls3.c libtls4.c libtls5.c libtls6.c libtls7.c libtls8.c libtls9.c libtls10.c libtls11.c libtls12.c libtls13.c libtls14.c libtls15.c libtls16.c libtls17.c libtls18.c libtls19.c libtls20.c libsymlink.so libdepC.so libdepB.so libdepA.so libcxxexceptB.so libcxxexceptA.so origin_dir/liboriginlib.so origin_dir/origin_subdir/liborigintarget.so libtestoutput.so libfuncdict.so runTests run_driver run_driver_rm spindle.rc preload_file_list test_driver test_driver_libs retzero_rx retzero_r retzero_x retzero_ badinterp hello_r.py hello_x.py hello_rx.py hello_.py hello_l.py badlink.py spindle_exec_test spindle_deactivated.sh liblocal.so symbind_test interpreter_test interpreter_test_dir/interpreter_test_perl alias/aliastest.py exec_shell.sh exec_shell.tcsh exec_shell_expected_output exec_shell exec_shell_env.sh libbigtls1024.so libbigtls204800.so libbigtls1048576.so +BUILT_SOURCES = libtest10.so libtest11.so libtest12.so libtest13.so libtest14.so libtest15.so libtest16.so libtest17.so libtest18.so libtest19.so libtest20.so libtest50.so libtest100.so libtest500.so libtest1000.so libtest2000.so libtest4000.so libtest6000.so libtest8000.so libtest10000.so libtls1.c libtls2.c libtls3.c libtls4.c libtls5.c libtls6.c libtls7.c libtls8.c libtls9.c libtls10.c libtls11.c libtls12.c libtls13.c libtls14.c libtls15.c libtls16.c libtls17.c libtls18.c libtls19.c libtls20.c libsymlink.so libdepC.so libdepB.so libdepA.so libcxxexceptB.so libcxxexceptA.so origin_dir/liboriginlib.so origin_dir/origin_subdir/liborigintarget.so libtestoutput.so libfuncdict.so runTests run_driver run_driver_rm spindle.rc preload_file_list test_driver test_driver_libs retzero_rx retzero_r retzero_x retzero_ badinterp hello_r.py hello_x.py hello_rx.py hello_.py hello_l.py badlink.py spindle_exec_test spindle_deactivated.sh liblocal.so symbind_test interpreter_test interpreter_test_dir/interpreter_test_perl alias/aliastest.py exec_shell.sh exec_shell.tcsh exec_shell_expected_output exec_shell exec_shell_env.sh libbigtls1024.so libbigtls204800.so libbigtls1048576.so close_range_test BUILT_SOURCES += crash_test crash_test_fixedaddr crash_test_pie libcrashfuncs.so libcrashctor.so libcrashfixed.so run_crash_tests.sh @@ -479,5 +479,8 @@ exec_shell_expected_output: $(srcdir)/exec_shell_expected_output_template exec_shell: $(srcdir)/exec_shell.c $(AM_V_CCLD)$(CC) $(CFLAGS) -o $@ $< -CLEANFILES = libtest10.c libtest11.c libtest12.c libtest13.c libtest14.c libtest15.c libtest16.c libtest17.c libtest18.c libtest19.c libtest20.c libtest10.so libtest50.c libtest50.so libtest100.c libtest100.so libtest500.c libtest500.so libtest1000.c libtest1000.so libtest2000.c libtest2000.so libtest4000.c libtest4000.so libtest6000.c libtest6000.so libtest8000.c libtest8000.so libtest10000.c libtest10000.so libsymlink.so libdepA.so libdepB.so libdepC.so libcxxexceptA.so libcxxexceptB.so libtestoutput.so libfuncdict.so runTests run_driver run_driver_rm spindle.rc test_driver test_driver_libs preload_file_list retzero_rx retzero_r retzero_x retzero_ badinterp hello_r.py hello_x.py hello_rx.py hello_.py hello_l.py badlink.py libtls1.c libtls2.c libtls3.c libtls4.c libtls5.c libtls6.c libtls7.c libtls8.c libtls9.c libtls10.c libtls11.c libtls12.c libtls13.c libtls14.c libtls15.c libtls16.c libtls17.c libtls18.c libtls19.c libtls20.c libtls1.so libtls2.so libtls3.so libtls4.so libtls5.so libtls6.so libtls7.so libtls8.so libtls9.so libtls10.so libtls11.so libtls12.so libtls13.so libtls14.so libtls15.so libtls16.so libtls17.so libtls18.so libtls19.so libtls20.so symbind_test libsymbind_a.so libsymbind_b.so libsymbind_c.so libsymbind_d.so libsymbind_e.so libsymbind_f.so libsymbind_g.so interpreter_test interpreter_test_dir/interpreter_test_perl alias exec_shell.sh exec_shell.tcsh exec_shell_env.sh exec_shell_expected_output exec_shell crash_test crash_test_fixedaddr crash_test_pie libcrashfuncs.so libcrashctor.so libcrashfixed.so run_crash_tests.sh libbigtls204800.so libbigtls1048576.so +close_range_test: $(srcdir)/close_range_test.c + $(AM_V_CCLD)$(CC) $(CFLAGS) -o $@ $< + +CLEANFILES = libtest10.c libtest11.c libtest12.c libtest13.c libtest14.c libtest15.c libtest16.c libtest17.c libtest18.c libtest19.c libtest20.c libtest10.so libtest50.c libtest50.so libtest100.c libtest100.so libtest500.c libtest500.so libtest1000.c libtest1000.so libtest2000.c libtest2000.so libtest4000.c libtest4000.so libtest6000.c libtest6000.so libtest8000.c libtest8000.so libtest10000.c libtest10000.so libsymlink.so libdepA.so libdepB.so libdepC.so libcxxexceptA.so libcxxexceptB.so libtestoutput.so libfuncdict.so runTests run_driver run_driver_rm spindle.rc test_driver test_driver_libs preload_file_list retzero_rx retzero_r retzero_x retzero_ badinterp hello_r.py hello_x.py hello_rx.py hello_.py hello_l.py badlink.py libtls1.c libtls2.c libtls3.c libtls4.c libtls5.c libtls6.c libtls7.c libtls8.c libtls9.c libtls10.c libtls11.c libtls12.c libtls13.c libtls14.c libtls15.c libtls16.c libtls17.c libtls18.c libtls19.c libtls20.c libtls1.so libtls2.so libtls3.so libtls4.so libtls5.so libtls6.so libtls7.so libtls8.so libtls9.so libtls10.so libtls11.so libtls12.so libtls13.so libtls14.so libtls15.so libtls16.so libtls17.so libtls18.so libtls19.so libtls20.so symbind_test libsymbind_a.so libsymbind_b.so libsymbind_c.so libsymbind_d.so libsymbind_e.so libsymbind_f.so libsymbind_g.so interpreter_test interpreter_test_dir/interpreter_test_perl alias exec_shell.sh exec_shell.tcsh exec_shell_env.sh exec_shell_expected_output exec_shell crash_test crash_test_fixedaddr crash_test_pie libcrashfuncs.so libcrashctor.so libcrashfixed.so run_crash_tests.sh libbigtls204800.so libbigtls1048576.so close_range_test diff --git a/testsuite/Makefile.in b/testsuite/Makefile.in index 6b53101c..fa308678 100644 --- a/testsuite/Makefile.in +++ b/testsuite/Makefile.in @@ -360,9 +360,9 @@ BUILT_SOURCES = libtest10.so libtest11.so libtest12.so libtest13.so \ alias/aliastest.py exec_shell.sh exec_shell.tcsh \ exec_shell_expected_output exec_shell exec_shell_env.sh \ libbigtls1024.so libbigtls204800.so libbigtls1048576.so \ - crash_test crash_test_fixedaddr crash_test_pie \ - libcrashfuncs.so libcrashctor.so libcrashfixed.so \ - run_crash_tests.sh + close_range_test crash_test crash_test_fixedaddr \ + crash_test_pie libcrashfuncs.so libcrashctor.so \ + libcrashfixed.so run_crash_tests.sh @BGQ_BLD_FALSE@DYNAMIC_FLAG = @BGQ_BLD_TRUE@DYNAMIC_FLAG = -dynamic @BGQ_BLD_FALSE@IS_BLUEGENE = false @@ -407,7 +407,8 @@ CLEANFILES = libtest10.c libtest11.c libtest12.c libtest13.c \ exec_shell.tcsh exec_shell_env.sh exec_shell_expected_output \ exec_shell crash_test crash_test_fixedaddr crash_test_pie \ libcrashfuncs.so libcrashctor.so libcrashfixed.so \ - run_crash_tests.sh libbigtls204800.so libbigtls1048576.so + run_crash_tests.sh libbigtls204800.so libbigtls1048576.so \ + close_range_test all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am @@ -1162,6 +1163,9 @@ exec_shell_expected_output: $(srcdir)/exec_shell_expected_output_template exec_shell: $(srcdir)/exec_shell.c $(AM_V_CCLD)$(CC) $(CFLAGS) -o $@ $< +close_range_test: $(srcdir)/close_range_test.c + $(AM_V_CCLD)$(CC) $(CFLAGS) -o $@ $< + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/testsuite/close_range_test.c b/testsuite/close_range_test.c new file mode 100644 index 00000000..1422f43c --- /dev/null +++ b/testsuite/close_range_test.c @@ -0,0 +1,90 @@ +#define _GNU_SOURCE +#include +#include +#include +#include +#include +#include +#include +#include + +/* closefrom and close_range were added in glibc 2.34 */ +#if defined(__GLIBC__) && __GLIBC_PREREQ(2, 34) + +static int run_child(int use_closefrom) +{ + int status; + pid_t pid = fork(); + if (pid == -1) { + perror("fork"); + return -1; + } + if (pid == 0) { + struct stat st; + int fd; + /* Intercepted stat to allow fork child to reconnect */ + stat("/", &st); + fd = open("/dev/null", O_RDONLY); + if (use_closefrom) { + /* closefrom(int lowfd) closes all file descriptors >= lowfd. */ + closefrom(3); + } + /* close_range(unsigned int first, unsigned int last, int flags) + * closes all file descriptors >= first and <= last. */ + else if (close_range(3, UINT_MAX, 0) == -1) { + perror("close_range"); + _exit(3); + } + /* Verify that the file we opened ourselves was closed */ + if (fcntl(fd, F_GETFD) != -1 || errno != EBADF) { + fprintf(stderr, "fd %d was not closed\n", fd); + _exit(2); + } + /* Verify that we can still exec after closing fds; + * if closefrom/close_range closed Spindle's own fds, + * this will fail. */ + execl("/bin/true", "true", (char *) NULL); + perror("execl"); + _exit(1); + } + if (waitpid(pid, &status, 0) == -1) { + perror("waitpid"); + return -1; + } + return status; +} + +int main(void) +{ + int result = 0, status; + + /* close_range gives ENOSYS if the kernel version doesn't support + * the corresponding syscall.*/ + if (close_range(INT_MAX, INT_MAX, 0) == -1 && errno == ENOSYS) { + printf("close_range_test skipped, kernel lacks close_range\n"); + return 0; + } + + status = run_child(0); + if (status != 0) { + fprintf(stderr, "close_range: child failed, status=%d\n", status); + result = 1; + } + + status = run_child(1); + if (status != 0) { + fprintf(stderr, "closefrom: child failed, status=%d\n", status); + result = 1; + } + return result; +} + +#else + +int main(void) +{ + printf("close_range_test skipped, glibc < 2.34\n"); + return 0; +} + +#endif diff --git a/testsuite/runTests_template b/testsuite/runTests_template index 2e04b924..64a1b301 100644 --- a/testsuite/runTests_template +++ b/testsuite/runTests_template @@ -193,6 +193,9 @@ CHECK_RETCODE ./run_driver --serial ./exec_shell CHECK_RETCODE +./run_driver --serial ./close_range_test +CHECK_RETCODE + if [[ $GLOBAL_RESULT != 0 ]]; then echo SOME TESTS FAILED exit -1 From 4f18d9823c7192f17d161b39be9d3ef5a7c8cbc8 Mon Sep 17 00:00:00 2001 From: Nicholas Chaimov Date: Wed, 30 Sep 2026 15:59:07 -0700 Subject: [PATCH 7/7] close_range, closefrom wrappers to skip Spindle's own FDs --- src/client/client/intercept.c | 2 ++ src/client/client/intercept.h | 4 +++ src/client/client/intercept_open.c | 38 ++++++++++++++++++++++++++++ src/client/client/should_intercept.c | 27 ++++++++++++++++++++ src/client/client/should_intercept.h | 1 + src/logging/spindle_logc.c | 6 +++++ src/logging/spindle_logc.h | 1 + 7 files changed, 79 insertions(+) diff --git a/src/client/client/intercept.c b/src/client/client/intercept.c index a6bb9d7a..0666b628 100644 --- a/src/client/client/intercept.c +++ b/src/client/client/intercept.c @@ -30,6 +30,8 @@ struct spindle_binding_t spindle_bindings[] = { { "fopen", (void **) &orig_fopen, "rtcache_fopen", (void *) rtcache_fopen }, { "fopen64", (void **) &orig_fopen64, "rtcache_fopen64", (void *) rtcache_fopen64 }, { "close", (void **) &orig_close, "rtcache_close", (void *) rtcache_close }, + { "close_range", (void **) &orig_close_range, "rtcache_close_range", (void *) rtcache_close_range }, + { "closefrom", (void **) &orig_closefrom, "rtcache_closefrom", (void *) rtcache_closefrom }, { "stat", (void **) &orig_stat, "rtcache_stat", (void *) rtcache_stat }, { "lstat", (void **) &orig_lstat, "rtcache_lstat", (void *) rtcache_lstat }, { "__xstat", (void **) &orig_xstat, "rtcache_xstat", (void *) rtcache_xstat }, diff --git a/src/client/client/intercept.h b/src/client/client/intercept.h index 3442ef5d..08586f22 100644 --- a/src/client/client/intercept.h +++ b/src/client/client/intercept.h @@ -48,6 +48,8 @@ extern int (*orig_open64)(const char *pathname, int flags, ...); extern FILE* (*orig_fopen)(const char *pathname, const char *mode); extern FILE* (*orig_fopen64)(const char *pathname, const char *mode); extern int (*orig_close)(int fd); +extern int (*orig_close_range)(unsigned int first, unsigned int last, int flags); +extern void (*orig_closefrom)(int lowfd); extern char* (*orig_getenv)(const char *name); extern int (*orig_setenv)(const char *name, const char *value, int overwrite); extern int (*orig_unsetenv)(const char *name); @@ -83,6 +85,8 @@ int rtcache_open64(const char *path, int oflag, ...); FILE *rtcache_fopen(const char *path, const char *mode); FILE *rtcache_fopen64(const char *path, const char *mode); int rtcache_close(int fd); +int rtcache_close_range(unsigned int first, unsigned int last, int flags); +void rtcache_closefrom(int lowfd); int execl_wrapper(const char *path, const char *arg0, ...); int execv_wrapper(const char *path, char *const argv[]); diff --git a/src/client/client/intercept_open.c b/src/client/client/intercept_open.c index 8c0e95b9..fda14185 100644 --- a/src/client/client/intercept_open.c +++ b/src/client/client/intercept_open.c @@ -43,6 +43,8 @@ int (*orig_open64)(const char *pathname, int flags, ...); FILE* (*orig_fopen)(const char *pathname, const char *mode); FILE* (*orig_fopen64)(const char *pathname, const char *mode); int (*orig_close)(int fd); +int (*orig_close_range)(unsigned int first, unsigned int last, int flags); +void (*orig_closefrom)(int lowfd); char* (*orig_dlerror)(); static int handle_proc_pid_maps_open(const char *path, char **newpath); @@ -294,6 +296,42 @@ int rtcache_close(int fd) return orig_close(fd); } +int rtcache_close_range(unsigned int first, unsigned int last, int flags) +{ + int fds[4]; + int n, i; + unsigned int lowfd = first; + + check_for_fork(); + + /* Make sure we call the original if we have + * invalid arguments so we get EINVAL. */ + if (first > last) + return orig_close_range(first, last, flags); + + /* Convert the close_range into a sequence of close_range calls, + * skipping over any of Spindle's own fds. */ + n = get_hidden_fds(fds); + for (i = 0; i < n; i++) { + unsigned int fd = (unsigned int) fds[i]; + if (fd < lowfd || fd > last) + continue; + if (fd > lowfd && orig_close_range(lowfd, fd - 1, flags) == -1) + return -1; + lowfd = fd + 1; + } + if (lowfd > last) + return 0; + return orig_close_range(lowfd, last, flags); +} + +void rtcache_closefrom(int lowfd) +{ + /* glibc uses MAX(0, lowfd); mimic that behavior */ + if (rtcache_close_range(lowfd < 0 ? 0 : lowfd, ~0U, 0) == -1) + orig_closefrom(lowfd); +} + char *dlerror_wrapper() { char *message = NULL; diff --git a/src/client/client/should_intercept.c b/src/client/client/should_intercept.c index cee4e43c..767bbb15 100644 --- a/src/client/client/should_intercept.c +++ b/src/client/client/should_intercept.c @@ -287,3 +287,30 @@ int fd_filter(int fd) return ORIG_CALL; } + +/* Places Spindle's fds into fds. + * fds must be of size at least 4; + * returns the number of fds added to fds */ +int get_hidden_fds(int *fds) +{ + int candidates[4]; + int n = 0; + int i, j; + + if (opts & OPT_NOHIDE) + return 0; + + client_get_raw_fds(ldcsid, &candidates[0], &candidates[1]); + get_debug_fds(&candidates[2], &candidates[3]); + + /* Put sorted candidates into fds, dropping -1 values */ + for (i = 0; i < 4; i++) { + if (candidates[i] < 0) + continue; + for (j = n; j > 0 && fds[j-1] > candidates[i]; j--) + fds[j] = fds[j-1]; + fds[j] = candidates[i]; + n++; + } + return n; +} diff --git a/src/client/client/should_intercept.h b/src/client/client/should_intercept.h index f6a9b510..4f9c3264 100644 --- a/src/client/client/should_intercept.h +++ b/src/client/client/should_intercept.h @@ -32,5 +32,6 @@ int fopen_filter(const char *fname, const char *flags); int exec_filter(const char *fname); int stat_filter(const char *fname); int fd_filter(int fd); +int get_hidden_fds(int *fds); #endif diff --git a/src/logging/spindle_logc.c b/src/logging/spindle_logc.c index 4e82300f..5eb65fa9 100644 --- a/src/logging/spindle_logc.c +++ b/src/logging/spindle_logc.c @@ -368,6 +368,12 @@ int is_debug_fd(int fd) return (fd == debug_fd || fd == test_fd); } +void get_debug_fds(int *log_fd, int *testlog_fd) +{ + *log_fd = debug_fd; + *testlog_fd = test_fd; +} + int spindle_debug_printf_impl(int priority, const char *file, unsigned int line, const char *func, const char *format, ...) { va_list ap; diff --git a/src/logging/spindle_logc.h b/src/logging/spindle_logc.h index f25ff44e..bb090668 100644 --- a/src/logging/spindle_logc.h +++ b/src/logging/spindle_logc.h @@ -109,5 +109,6 @@ void init_spindle_debugging(char *name, int survive_exec); void fini_spindle_debugging(); void reset_spindle_debugging(); int is_debug_fd(int fd); +void get_debug_fds(int *log_fd, int *testlog_fd); #endif