This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Avoid calling stat with empty name in relocate_gdb_directory
- From: Tom Tromey <tromey at redhat dot com>
- To: "Pierre Muller" <pierre dot muller at ics-cnrs dot unistra dot fr>
- Cc: <gdb-patches at sourceware dot org>
- Date: Wed, 05 Dec 2012 11:02:49 -0700
- Subject: Re: [RFA] Avoid calling stat with empty name in relocate_gdb_directory
- References: <29503.7594777115$1354726985@news.gmane.org>
>>>>> "Pierre" == Pierre Muller <pierre.muller@ics-cnrs.unistra.fr> writes:
Pierre> With the troubles that I have with my patch,
Pierre> I started looking into a memory debugger...
Pierre> I finally started to use drmemory
Pierre> for mingw compiled GDB executables.
Pierre> I don't know if stat is supposed to handle (*dir == '\0'),
Pierre> but I thought that it should anyhow succeed in that case,
Pierre> so the patch below simply don't call stat if name is empty.
At least here I get an error.
Pierre> Tell me if you rather think that this is a msvcrt bug that
Pierre> should not be fixed in GDB...
I don't mind working around it, but I wonder how we end up there with an
empty 'dir' in the first place. Perhaps that is a bug instead.
Tom