bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bash shouldn't perform syntax check on single-quoted strings


From: Oğuz
Subject: Bash shouldn't perform syntax check on single-quoted strings
Date: Fri, 5 Feb 2021 13:15:22 +0300

  $ echo '
  > ${a+$(|)}
  bash: command substitution: line 7: syntax error near unexpected token `|'
  bash: command substitution: line 7: `|)}'
  bash: unexpected EOF while looking for matching `)'
  >

Reproducible on devel, 5.1.4, and 5.0.17, but the latter handles it better.

And while testing this on devel, I came across another one:

  $ echo $BASH_VERSIbash: xmalloc: stringvec.c:40: cannot allocate
15227146888 bytes (2510848 bytes allocated)
  $
  $ echo $BASH_VERSIOSegmentation fault (core dumped)
  $

I hit tab a few times to get the segfault.

Oğuz


reply via email to

[Prev in Thread] Current Thread [Next in Thread]