From 9a9af70296bfbdb5be1d9521415d87fd4accaa34 Mon Sep 17 00:00:00 2001 From: Philippe Altherr Date: Sun, 26 Jul 2026 21:22:48 -0700 Subject: 55021: prevent segfault upon "typeset -U" of a tied array hidden by a local --- Test/B02typeset.ztst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'Test') diff --git a/Test/B02typeset.ztst b/Test/B02typeset.ztst index cec82dea8..8b66c184f 100644 --- a/Test/B02typeset.ztst +++ b/Test/B02typeset.ztst @@ -301,6 +301,20 @@ >local unique tied array SCALAR >array local tied SCALAR array + typeset -T VAR var=(a b c b a) + () { + typeset -i var=1 + typeset -g -U VAR + typeset -p VAR var + } + typeset -p VAR var +0:Regression test for not segfaulting when uniquifying a hidden tied array +F:BUG:The inner "typeset -p VAR" should contain the value of the outer "var" +>typeset -g -UT VAR var=1 +>typeset -i var=1 +>typeset -UT VAR var=( a b c ) +>typeset -aT VAR var=( a b c ) + typeset -T SCALAR array typeset +T SCALAR 1:Untying is prohibited -- cgit v1.3.1