mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-11 00:51:05 +02:00
44296: "typeset Q= {X}" crashed the shell.
This commit is contained in:
parent
95211f87ed
commit
30e356eb1a
3 changed files with 20 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2019-05-14 Peter Stephenson <p.stephenson@samsung.com>
|
||||||
|
|
||||||
|
* 44296: Src/parse.c, Test/B02typeset.ztst: "typeset Q= {X}"
|
||||||
|
crashed the shell.
|
||||||
|
|
||||||
2019-05-13 Peter Stephenson <p.stephenson@samsung.com>
|
2019-05-13 Peter Stephenson <p.stephenson@samsung.com>
|
||||||
|
|
||||||
* 44259: Src/signals.c: Ensure we can set signal to default
|
* 44259: Src/signals.c: Ensure we can set signal to default
|
||||||
|
|
|
@ -1899,6 +1899,14 @@ par_simple(int *cmplx, int nr)
|
||||||
p += nrediradd;
|
p += nrediradd;
|
||||||
sr += nrediradd;
|
sr += nrediradd;
|
||||||
}
|
}
|
||||||
|
else if (postassigns)
|
||||||
|
{
|
||||||
|
/* C.f. normal case below */
|
||||||
|
postassigns++;
|
||||||
|
ecadd(WCB_ASSIGN(WC_ASSIGN_SCALAR, WC_ASSIGN_INC, 0));
|
||||||
|
ecstr(toksave);
|
||||||
|
ecstr(""); /* TBD can possibly optimise out */
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ecstr(toksave);
|
ecstr(toksave);
|
||||||
|
|
|
@ -1101,3 +1101,10 @@
|
||||||
>export zsh_exported_readonly_scalar=1
|
>export zsh_exported_readonly_scalar=1
|
||||||
>readonly zsh_exported_readonly_array=( 2 )
|
>readonly zsh_exported_readonly_array=( 2 )
|
||||||
>readonly zsh_exported_readonly_scalar=1
|
>readonly zsh_exported_readonly_scalar=1
|
||||||
|
|
||||||
|
# The second case was buggy as it needs special handling in postassigns
|
||||||
|
(typeset {X})
|
||||||
|
(typeset Q= {X})
|
||||||
|
1:Regression test for {...} parsing in typeset
|
||||||
|
?(eval):typeset:2: not valid in this context: {X}
|
||||||
|
?(eval):typeset:3: not valid in this context: {X}
|
||||||
|
|
Loading…
Reference in a new issue