Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Aditya Kamath <Aditya.Kamath1@ibm.com>
Cc: Keith Seitz <keiths@redhat.com>,
	 Aditya Vidyadhar Kamath <akamath996@gmail.com>,
	 "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Fix crash in AIX when current working directory is NULL
Date: Fri, 26 Jun 2026 08:56:14 -0600	[thread overview]
Message-ID: <87wlvlwdtd.fsf@tromey.com> (raw)
In-Reply-To: <LV8PR15MB64884DBF4B23F939D161EB14D6ED2@LV8PR15MB6488.namprd15.prod.outlook.com> (Aditya Kamath's message of "Wed, 24 Jun 2026 11:50:01 +0000")

> I did test other places where getcwd () is used. But the only thing is
> it is not causing any crash. I could not produce a similar issue when
> getcwd () is not able to get the current directory for any reason due
> to other files using getcwd().

> What do you think is the best thing we can do? Should we then change
> the main.c file as well to handle getcwd () failing to make it uniform
> everywhere in GDB wherever possible since we are thinking there will
> be a way by which one can run into similar issue due to the same?

FWIW there's also this bug:

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

and this old thread:

    https://sourceware.org/pipermail/gdb-patches/2026-January/224101.html

Maybe we should have just landed this earlier rather than asking to fix
it in a real way.

It's not totally clear to me what a good approach might be.
Like there's no good default to use when getcwd fails.  Maybe "/"?

Tom

  reply	other threads:[~2026-06-26 14:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-22  9:11 Aditya Vidyadhar Kamath
2026-06-23 17:10 ` Keith Seitz
2026-06-24 11:50   ` Aditya Kamath
2026-06-26 14:56     ` Tom Tromey [this message]
2026-06-29 12:35       ` Aditya Kamath
2026-06-26 16:15 ` Ulrich Weigand

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=87wlvlwdtd.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=Aditya.Kamath1@ibm.com \
    --cc=akamath996@gmail.com \
    --cc=gdb-patches@sourceware.org \
    --cc=keiths@redhat.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