bug-gnulib
[Top][All Lists]
Advanced

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

Re: [PATCH 1/6] canonicalize-lgpl: fix EOVERFLOW bug


From: Paul Eggert
Subject: Re: [PATCH 1/6] canonicalize-lgpl: fix EOVERFLOW bug
Date: Thu, 17 Dec 2020 02:55:19 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0

On 12/11/20 5:03 AM, Adhemerval Zanella wrote:

I have sent a similar fix to reviews for this very issue for glibc
(which is based on the canonicalize-lgpl) along with other fixes that
you might take a look at [1].

Thanks, I looked at that when composing the patches I just now installed into Gnulib, which also attempt to make future glibc merges easier. I think these patches address the issues mentioned in [1] (though sometimes in different ways), except they don't do what this patch does:

https://patchwork.sourceware.org/project/glibc/patch/20201027143531.2448132-4-adhemerval.zanella@linaro.org/

This patch seems incomplete, since it doesn't address the issue that canonicalize_file_name ("/a/b/.") incorrectly returns "/a/b" even when /a/b is a regular file.

Come to think of it, the current Gnulib is suboptimal in that it uses stat ("/a/b/foo/", ...) to test for the existence of a directory /a/b/foo. It could use faccessat (AT_FDCWD, "/a/b/foo/", F_OK, AT_EACCESS), which is often cheaper as it needn't fill in the stat structure.

I'll try to make time to look into these two issues, which are somewhat related in the implementations of canonicalize-lgpl and canonicalize.



reply via email to

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