This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA 1/6] Change reopen_exec_file to check result of stat


On Mon, Jun 6, 2016 at 10:33 PM, Tom Tromey <tom@tromey.com> wrote:
> This seems to be a real bug found by -Wunused-but-set-variable.  If
> "stat" fails for some reason, gdb would use the uninitialized "st".
>
> 2016-06-06  Tom Tromey  <tom@tromey.com>
>
>         * corefile.c (reopen_exec_file): Only examine st.st_mtime if stat
>         succeeded.

Patch is good to me.

-- 
Yao (éå)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]