From: Vladimir Prus <vladimir@codesourcery.com>
To: "Pierre Muller" <muller@ics.u-strasbg.fr>
Cc: gdb-patches@sources.redhat.com
Subject: Re: Better realpath
Date: Sat, 14 Jun 2008 12:14:00 -0000 [thread overview]
Message-ID: <200806141509.28797.vladimir@codesourcery.com> (raw)
In-Reply-To: <000001c8ce09$d121f430$7365dc90$@u-strasbg.fr>
On Saturday 14 June 2008 14:31:32 Pierre Muller wrote:
> I just looked at your patch and the idea seems
> good... But I am no expert on this field.
>
> One question though, libiberty lrealpath
> function uses strdup, while the replaced
> code uses xstrdup.
> xstrdup is also defined in libiberty
> as being a replacement of strdup that never
> fails... (didn't really get how this is
> possible...)
>
> Anyhow, is this a potential issue?
I don't think so. xstrdup is supposed to fail if it cannot get enough
memory. lrealpath, as it is now, will return NULL, but with my patch,
there's a check for that in gdb_realpath -- and a call to nomem.
(And no, I did not think about that myself -- Dan suggested the
check and the call to nomem).
- Volodya
next prev parent reply other threads:[~2008-06-14 11:09 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-14 11:09 Vladimir Prus
2008-06-14 11:30 ` Pierre Muller
2008-06-14 12:14 ` Vladimir Prus [this message]
2008-06-14 14:29 ` Eli Zaretskii
2008-06-14 15:10 ` Vladimir Prus
2008-06-14 22:05 ` Eli Zaretskii
2008-06-14 22:26 ` Vladimir Prus
2008-06-15 17:37 ` Eli Zaretskii
2008-06-15 17:43 ` Daniel Jacobowitz
2008-06-15 21:04 ` Eli Zaretskii
2008-06-16 3:17 ` Daniel Jacobowitz
2008-06-16 3:32 ` Eli Zaretskii
2008-06-18 18:39 ` Stan Shebs
2008-06-18 20:47 ` DJ Delorie
2008-06-18 15:22 ` Vladimir Prus
2008-06-18 21:08 ` Eli Zaretskii
2008-06-19 7:27 ` Vladimir Prus
2008-06-20 2:49 ` Eli Zaretskii
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=200806141509.28797.vladimir@codesourcery.com \
--to=vladimir@codesourcery.com \
--cc=gdb-patches@sources.redhat.com \
--cc=muller@ics.u-strasbg.fr \
/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