[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Comma expression in arithmetic evaluation referring to arrays make b
Re: Comma expression in arithmetic evaluation referring to arrays make bash crash.
Mon, 15 Feb 2016 16:03:12 +0100
it also works fine in GNU bash, version
Sorry for troubbling you, I will upgrade
Regards -- Pontus
Greg Wooledge <address@hidden>
Chet Ramey <address@hidden>
Pontus Stenström <address@hidden>,
Re: Comma _expression_
in arithmetic evaluation referring to arrays make bash crash.
On Mon, Feb 15, 2016 at 09:31:57AM -0500, Chet Ramey
> On 2/15/16 8:57 AM, Pontus Stenström wrote:
> > Bash Version: 4.2
> > Patch Level: 24
> > Release Status: release
> > Description:
> > Comma _expression_ in arithmetic evaluation referring
to arrays make bash
> > crash.
> > Repeat-By:
> > This works fine:
> > ((c=3, d=4))
> > This crashes my bash:
> > a=(2 3 4 5) # OK
> > ((c=a, d=a)) # Crash
> It runs fine on bash-4.3.42 on RHEL 5 and Mac OS X.
On HP-UX, it doesn't crash, but doesn't work quite right either:
imadev:~$ bash-4.2 -c 'echo "$BASH_VERSION"; a=(2 3 4 5); ((c=a,
d=a)); declare -p a c d'
declare -a a='(="2" ="3" ="4" ="5")'
declare -- c="5"
bash-4.2: line 0: declare: d: not found
4.2 is the second-newest release, but 4.2.24 is 29 patches behind.
The current patch level for 4.2 is 4.2.53. I'm apparently a bit behind
the current patch level as well.
It works in 4.3, as Chet said.
You are hereby formally notified that all information contained in this
communication and any attachments shall be deemed strictly confidential
and privileged unless explicitly stated otherwise. Please note that your
use of confidential information may be governed, and restricted, by a non-disclosure
agreement. The information contained in this communication and any attachments
is disclosed for the sole use of the intended recipient(s). If you are
not the intended recipient, you are hereby formally notified that any unauthorized
review, use, disclosure or distribution of this message is prohibited.
Please notify the sender immediately by replying to this message and destroy
all copies of this message and any attachments. Mycronic is neither liable
for the proper and complete transmission of the information contained in
this communication, nor for any delay in its receipt.