]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
install: fix crash with --strip and large $PATH on ppc and sparc master
authorPádraig Brady <P@draigBrady.com>
Fri, 7 Nov 2025 16:14:12 +0000 (16:14 +0000)
committerPádraig Brady <P@draigBrady.com>
Fri, 7 Nov 2025 16:36:08 +0000 (16:36 +0000)
* gnulib: Update to the latest gnulib to pull in the fix
(v1.0-2406-g89f63027de) to allocate the $PATH processing memory
before the vfork call, which is required on ppc and sparc.
* tests/install/basic-1.sh: Ensure posix_spawnp() suports a large $PATH,
which needs careful handling with vfork() as detailed in gnulib.

gnulib
tests/install/basic-1.sh

diff --git a/gnulib b/gnulib
index c4db1328fb2f01b83400cfb1f6d6c2bed953177c..f5d93312df380b06ef375629be4c301f85fd6d9a 160000 (submodule)
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit c4db1328fb2f01b83400cfb1f6d6c2bed953177c
+Subproject commit f5d93312df380b06ef375629be4c301f85fd6d9a
index fd13eb68bc84e2d76021502929adf61a7f7f0dd4..b529f2af9ccbaebb8801c8598aac37e24f8e2c9d 100755 (executable)
@@ -64,6 +64,11 @@ test -f $dd || fail=1
 mode=$(ls -l $dir/$dd|cut -b-10)
 test "$mode" = -r-xr-xr-x || fail=1
 
+# Ensure there are no issues with posix_spawnp() and large $PATHs
+# which we saw when initially changing from execvp() to posix_spawnp().
+PATH=$(printf '%4001s' '' | sed 's/\(.\{79\}\)./\1:/g'):$PATH \
+  ginstall $strip -c -m 555 $dd $dir || fail=1
+
 # These failed in coreutils CVS from 2004-06-25 to 2004-08-11.
 ginstall -d . || fail=1
 ginstall -d newdir || fail=1