public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/24970] realpath mishandles EOVERFLOW; stat not needed anyway
       [not found] <bug-24970-131@http.sourceware.org/bugzilla/>
@ 2020-08-18 21:55 ` adhemerval.zanella at linaro dot org
  2020-12-28 13:06 ` adhemerval.zanella at linaro dot org
  2021-01-05 16:35 ` adhemerval.zanella at linaro dot org
  2 siblings, 0 replies; 3+ messages in thread
From: adhemerval.zanella at linaro dot org @ 2020-08-18 21:55 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=24970

Adhemerval Zanella <adhemerval.zanella at linaro dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |adhemerval.zanella at linaro dot o
                   |                            |rg

--- Comment #2 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
The EOVERFLOW should not happen with internal LFS call, at least not on Linux
(not sure about Hurd).  So I am not sure if this really characterize an issue,
there are other LFS stat usages that do not handle EOVERFLOW.

I also checked the proposed patch and it triggers two regression on stdlib
test-canon.c:

 94   {"./doesExist/someFile/",             0, "./doesExist/someFile",
ENOTDIR},
 95   {"./doesExist/someFile/..",           0, "./doesExist/someFile",
ENOTDIR},

The filesystem status prior the calls are:

  mkdir ("doesExist", 0777)
  creat ("doesExist/someFile", 0777) 

For the test at line 94 I could adjust the algorithm to avoid terminate if the
'start' and 'end' buffer is equal and returning if readlink call returns
'ENOENT'.

However, for the case at line 95 I see to easy way to avoid issuing an extra
'readlink' call for each '..' at line 120 to check if the previous component
can be really accessed, otherwise the next iteration will check a possible
valid path and end early (in the example "doesExist/someFile/.." returns
"doesExist/" with the proposed patch).

So with the extra 'readlink' call issues on every '..' I am not sure this is
really a gain performance-wise.  If you have a better strategy how to use
'readlink' and still provide the same semantic for such cases I think it should
be worth, otherwise I think current approach it ok as is.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug libc/24970] realpath mishandles EOVERFLOW; stat not needed anyway
       [not found] <bug-24970-131@http.sourceware.org/bugzilla/>
  2020-08-18 21:55 ` [Bug libc/24970] realpath mishandles EOVERFLOW; stat not needed anyway adhemerval.zanella at linaro dot org
@ 2020-12-28 13:06 ` adhemerval.zanella at linaro dot org
  2021-01-05 16:35 ` adhemerval.zanella at linaro dot org
  2 siblings, 0 replies; 3+ messages in thread
From: adhemerval.zanella at linaro dot org @ 2020-12-28 13:06 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=24970

Adhemerval Zanella <adhemerval.zanella at linaro dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at sourceware dot org   |adhemerval.zanella at linaro dot o
                   |                            |rg

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug libc/24970] realpath mishandles EOVERFLOW; stat not needed anyway
       [not found] <bug-24970-131@http.sourceware.org/bugzilla/>
  2020-08-18 21:55 ` [Bug libc/24970] realpath mishandles EOVERFLOW; stat not needed anyway adhemerval.zanella at linaro dot org
  2020-12-28 13:06 ` adhemerval.zanella at linaro dot org
@ 2021-01-05 16:35 ` adhemerval.zanella at linaro dot org
  2 siblings, 0 replies; 3+ messages in thread
From: adhemerval.zanella at linaro dot org @ 2021-01-05 16:35 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=24970

Adhemerval Zanella <adhemerval.zanella at linaro dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |2.33
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #3 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
Fixed on 2.33.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-01-05 16:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-24970-131@http.sourceware.org/bugzilla/>
2020-08-18 21:55 ` [Bug libc/24970] realpath mishandles EOVERFLOW; stat not needed anyway adhemerval.zanella at linaro dot org
2020-12-28 13:06 ` adhemerval.zanella at linaro dot org
2021-01-05 16:35 ` adhemerval.zanella at linaro dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).