Tina Harriott
2013-08-30 13:27:55 UTC
Latest (sh (AT&T Research) 93v- 2013-08-27) ksh crashes if I
explicitly unset a variable with unset(1) which contains a
multidimensional array:
ksh -c 'compound c;typeset -a c.a ; function c.a.unset { printf
"%s,%s\n" "${.sh.name}" "${.sh.subscript}"; } ; (( c.a[3][6][11][20]=7
, c.a[3][6][300][20]=7 )) ; unset c'
c.a,3
c.a[3][6],11
Segmentation fault
The crash however is not the issue which troubles me. The values of
.sh.name and .sh.subscript are:
I have two elements in the array and would expect three calls of c.a.unset:
1. .sh.name=c.a, .sh.subscript=[3][6][11][20]
2. .sh.name=c.a, .sh.subscript=[3][6][300][20]
3. .sh.name=c.a, .sh.subscript not set (called to dispose the array
object itself)
The real values in .sh.name and .sh.subscript when c.a.unset() is
called are dubious at best.
Tina
explicitly unset a variable with unset(1) which contains a
multidimensional array:
ksh -c 'compound c;typeset -a c.a ; function c.a.unset { printf
"%s,%s\n" "${.sh.name}" "${.sh.subscript}"; } ; (( c.a[3][6][11][20]=7
, c.a[3][6][300][20]=7 )) ; unset c'
c.a,3
c.a[3][6],11
Segmentation fault
The crash however is not the issue which troubles me. The values of
.sh.name and .sh.subscript are:
I have two elements in the array and would expect three calls of c.a.unset:
1. .sh.name=c.a, .sh.subscript=[3][6][11][20]
2. .sh.name=c.a, .sh.subscript=[3][6][300][20]
3. .sh.name=c.a, .sh.subscript not set (called to dispose the array
object itself)
The real values in .sh.name and .sh.subscript when c.a.unset() is
called are dubious at best.
Tina
--
Tina Harriott - Women in Mathematics
Contact: tina.harriott.math at gmail.com
Tina Harriott - Women in Mathematics
Contact: tina.harriott.math at gmail.com