[Top][All Lists]

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

Re: Segfault in Bash

From: Chet Ramey
Subject: Re: Segfault in Bash
Date: Wed, 15 Jul 2020 10:22:36 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

On 7/14/20 12:02 PM, Ilkka Virta wrote:
> On 14.7. 16:08, Chet Ramey wrote:
>> On 7/14/20 6:32 AM, Jeffrey Walton wrote:
>>> ./audit-libs.sh: line 17: 22929 Segmentation fault      (core dumped)
>>> $(echo "$file" | grep -E "*.so$")
>> Bash is reporting that a process exited due to a seg fault, but it is
>> not necessarily a bash process.
> As a suggestion: it might be useful if the error message showed the actual
> command that ran, after expansions. Here it shows the same command each
> time, and if only one of them crashed, you wouldn't immediately know which
> one it was. The un-expanded source line is in any case available in the
> script itself.

I understand the reasoning, but it's better to have the command reported as
dumping core easier to resolve back to what was present in the script. It
makes it easier to track the error.

If you want the expanded command, enable xtrace for the portion of the
script of interest while you're debugging the problem.

``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]