VFS breaks when [pwd] is non-existent native directory
Open469c5ea507367fa9f8c8587c2502d93e0f425231Created 8 years agoUpdated 8 years ago
Descriptionplain2018-11-08 17:41:53
Debian records this bug in Tcl filesystem operations: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=913189
dgpplain2018-11-08 17:42:33
Copying their demo: o reproduce: $ rm -rf d $ mkdir d $ cd d $ rm -rf ../d $ env - pwd pwd: couldn't find directory entry in '..' with matching i-node $ tclsh8.6 % file delete spong error deleting "spong": bad address in system call argument % strace shows: getcwd(0x7ffcf224aeb0, 4097) = -1 ENOENT (No such file or directory) lstat(NULL, 0x7ffcf224c100) = -1 EFAULT (Bad address)
dgpplain2018-11-08 17:44:25
Comments there continue: "Not sure why `file delete spong' needs to call cwd at all, but certainly it should have a proper error check." Tcl's Virtual File System tends to do a lot of 'cwd' calling to determining which of the mounted filesystems a pathname should belong to. It appears this failure dates back to the arrival of VFS in Tcl 8.5.
Log in (anonymous is fine) to add a comment.