]> git.ipfire.org Git - thirdparty/make.git/commitdiff
* tests/scripts/functions/shell: [SV 65323] Run huge var test in bash
authorDmitry Goncharov <dgoncharov@users.sf.net>
Sun, 21 Apr 2024 17:35:33 +0000 (13:35 -0400)
committerPaul Smith <psmith@gnu.org>
Mon, 6 May 2024 18:11:17 +0000 (14:11 -0400)
The long variable name causes ksh to crash.  Some systems use ksh as
/bin/sh, so force bash if it's available else skip the test.

tests/scripts/functions/shell

index b9b9ee3217a8686f58373f9ec748fd96a41ba495..35d2b3cbda0c37bb6e90375529908f39a1a30463 100644 (file)
@@ -213,12 +213,15 @@ endif
                   '--no-print-directory -j2', ": 2\n: 1");
 }
 
-if ($port_type eq 'UNIX') {
+# sv 65323. Check for bash, because such long variable name causes ksh to
+# segfault.
+if (-x '/bin/bash') {
     # sv 65172.
     # Buffer overrun in recursively_expand_for_file on a variable with a long
     # name.
     my $v = "a1234567890" x 4 x 1000;
     run_make_test("
+SHELL:=/bin/bash
 export $v=\$(shell echo hello)
 all:; \@echo \$\$$v
 ", '', "hello\n");