bug-bash
[Top][All Lists]
Advanced

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

Re: [bash-devel] Attempting to cd to the empty directory operand where .


From: Chet Ramey
Subject: Re: [bash-devel] Attempting to cd to the empty directory operand where ./ does not exist aborts
Date: Mon, 29 Jan 2024 10:30:43 -0500
User-agent: Mozilla Thunderbird

On 1/29/24 5:51 AM, Kerin Millar wrote:

$ bash -c 'declare -p BASH_VERSION; cd ""'
shell-init: error retrieving current directory: getcwd: cannot access parent 
directories: No such file or directory
declare -- BASH_VERSION="5.3.0(4)-devel"
chdir: error retrieving current directory: getcwd: cannot access parent 
directories: No such file or directory
malloc: ./cd.def:619: assertion botched
malloc: 0x56be197137b0: allocated: last allocated from pathcanon.c:109
free: start and end chunk sizes differ
Aborting...Aborted (core dumped)

Thanks for the report. `cd' should not try to canonicalize empty pathnames;
it should just see what chdir(2) returns and go from there.

And, again, with bash 5.2.

I suspect your version of bash-5.2 is built without the bash malloc for
some reason, since I can reproduce this with bash-5.2.

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

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature


reply via email to

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