Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@palves.net>
To: Jon Turney <jon.turney@dronecode.org.uk>,
	Orgad Shaneh <orgads@gmail.com>,
	gdb-patches@sourceware.org
Subject: Re: [PATCH] Better handling for realpath() failures in windows_make_so() on Cygwin
Date: Thu, 21 Mar 2024 16:13:38 +0000	[thread overview]
Message-ID: <d9812dd1-3803-4681-8559-b63795901d6a@palves.net> (raw)
In-Reply-To: <e37c2bcf-e6d8-4e24-8f90-d106deba319b@dronecode.org.uk>

On 2024-03-21 14:45, Jon Turney wrote:
> On 21/03/2024 06:53, Orgad Shaneh wrote:
>> From: Jon Turney <jon.turney@dronecode.org.uk>
> 
> Not sure where this is coming from, but this doesn't seem to be my latest version of this patch.
> 
>> Fix a memory leak which would occur in the case when the result of realpath() is
>> greater than or equal to SO_NAME_MAX_PATH_SIZE.
>>
>> Distinguish between realpath() failing (returning NULL), and returning a path
>> longer than SO_NAME_MAX_PATH_SIZE
>>
>> Warn rather than stopping with an error in those cases.
> 
> This line in the patch commentary, and the title, refers to the part of the patch submitted [1], which is already applied as commit a0e9b53238c3033222c53b1654da535c0743ab6e.
> 
> I separated that out because of the discussion starting at [2] ("Remove SO_NAME_PATH_SIZE instead"...)
> 
> [1] https://sourceware.org/pipermail/gdb-patches/2020-January/164695.html
> [2] https://sourceware.org/pipermail/gdb-patches/2016-January/130435.html
> 

Curiously, after upstreaming your _sigbe unwinder recently, I looked at upstreaming this patch (the version of the 2016 patch 
in downstream cygwin gdb), but then this same thought of removing the limit hit me.  (at least I'm consistent over the
years, eh.)

I then realized that Simon is working on a series that switches the solib path storage to a std::string, which will
let us easily not use SO_NAME_MAX_PATH_SIZE at all in the Windows code.  So I just dropped that patch from
my upstreaming queue...

Pedro Alves


  reply	other threads:[~2024-03-21 16:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-21  6:53 Orgad Shaneh
2024-03-21  7:22 ` Orgad Shaneh
2024-03-21 15:04   ` Tom Tromey
2024-03-21 14:45 ` Jon Turney
2024-03-21 16:13   ` Pedro Alves [this message]
2024-03-21 16:31     ` Orgad Shaneh
2024-03-22 19:07       ` Pedro Alves
  -- strict thread matches above, loose matches on Subject: below --
2016-01-20 15:54 Jon Turney
2016-01-20 16:19 ` Pedro Alves
2016-03-09 17:49   ` Jon Turney
2016-03-09 18:09     ` Pedro Alves

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=d9812dd1-3803-4681-8559-b63795901d6a@palves.net \
    --to=pedro@palves.net \
    --cc=gdb-patches@sourceware.org \
    --cc=jon.turney@dronecode.org.uk \
    --cc=orgads@gmail.com \
    /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