[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bash-devel] Attempting to cd to the empty directory operand where ./ do
From: |
Kerin Millar |
Subject: |
[bash-devel] Attempting to cd to the empty directory operand where ./ does not exist aborts |
Date: |
Mon, 29 Jan 2024 10:51:57 +0000 |
Hi,
This is with commit 138f3cc3591163d18ee4b6390ecd6894d5d16977 running on Linux
6.7.2 and glibc-2.38.
$ mkdir -p ~/dir && cd ~/dir && rmdir ~/dir
$ cd ""
bash: cd: : No such file or directory
So far, so good. Now let's try to cd from a non-interactive instance.
$ 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)
And, again, with bash 5.2.
$ /bin/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.2.26(1)-release"
chdir: error retrieving current directory: getcwd: cannot access parent
directories: No such file or directory
--
Kerin Millar
- [bash-devel] Attempting to cd to the empty directory operand where ./ does not exist aborts,
Kerin Millar <=