public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: Siddhesh Poyarekar <siddhesh@sourceware.org>, libc-alpha@sourceware.org
Subject: Re: [PATCH] ldconfig: Fix memory leaks
Date: Wed, 19 May 2021 11:22:35 -0300	[thread overview]
Message-ID: <6d13d7c8-96bd-a5cb-1eaf-4d5d739da21a@linaro.org> (raw)
In-Reply-To: <b154be12-e134-0f92-2982-c485e31bd443@sourceware.org>



On 19/05/2021 11:03, Siddhesh Poyarekar wrote:
> On 5/19/21 7:24 PM, Adhemerval Zanella wrote:
>> It would be straightforward change, but I think there is no much gain in
>> either supporting a path larger than PATH_MAX (it might fail in later
>> usages anyway if the full path is used) or trying to add the optimization
>> of just resolving the PATH.
> 
> I don't think it can support paths larger than PATH_MAX because the later lstat64 will fail with ENAMETOOLONG.
> 
>> What I really dislike is that chroot_canon is quite similar to the old
>> realpath implementation we had, and analyzing its usage I think we can
>> just resolve the full path ([chroot,path]) with realpath instead of
>> call chroot_canon.  It would require more changes in ldconfig code
>> though.
> 
> I think your patch with the changes I suggested ought to be a sufficient minimal change.  Do you want to fix up and post?

Alright, I think it is the simplest approach.

      reply	other threads:[~2021-05-19 14:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-11 17:16 Siddhesh Poyarekar
2021-05-17 16:00 ` [PING][PATCH] " Siddhesh Poyarekar
2021-05-17 17:15 ` [PATCH] " Adhemerval Zanella
2021-05-18  3:43   ` Siddhesh Poyarekar
2021-05-18  4:49     ` Siddhesh Poyarekar
2021-05-18  4:52       ` Siddhesh Poyarekar
2021-05-18 13:08         ` Adhemerval Zanella
2021-05-19  4:24           ` Siddhesh Poyarekar
2021-05-19 13:54             ` Adhemerval Zanella
2021-05-19 14:03               ` Siddhesh Poyarekar
2021-05-19 14:22                 ` Adhemerval Zanella [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6d13d7c8-96bd-a5cb-1eaf-4d5d739da21a@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=libc-alpha@sourceware.org \
    --cc=siddhesh@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).