bug-bash
[Top][All Lists]
Advanced

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

Re: `verb=(--) declare -ax verb` causes an ENOTSOCK segfault


From: Chet Ramey
Subject: Re: `verb=(--) declare -ax verb` causes an ENOTSOCK segfault
Date: Mon, 19 Jun 2023 12:52:43 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.12.0

On 6/16/23 1:02 AM, Wiley Young wrote:

Bash Version: 5.2
Patch Level: 15
Release Status: release

Description:
    `verb=(--) declare -ax verb` causes bash to crash and closes the active
terminal tab. strace output includes this error: "getpeername(0,
0x7ffc74d185d0, [16])    = -1 ENOTSOCK (Socket operation on non-socket)"

Thanks for the report. The ENOTSOCK error is a red herring; it's the shell
checking whether or not it's being run by ssh, and isn't related to this.

The real issue is that the temporary environmnent assignment needs to be
converted into an array (declare -ax) and then propagated back to the
previous scope with attributes and value intact. It will be fixed in the
next devel branch push.

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/




reply via email to

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