From e3f938caf893f485c9216e26a4f48731fccc43a8 Mon Sep 17 00:00:00 2001 From: Dmitry Goncharov Date: Sun, 21 Apr 2024 13:35:33 -0400 Subject: [PATCH] * tests/scripts/functions/shell: [SV 65323] Run huge var test in bash 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 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/scripts/functions/shell b/tests/scripts/functions/shell index b9b9ee32..35d2b3cb 100644 --- a/tests/scripts/functions/shell +++ b/tests/scripts/functions/shell @@ -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");