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: [PATCH] cgen: opcodes: Fix memory corruption in in lookup


Hi Yao,

On Wed, Feb 08, 2017 at 05:01:05PM +0000, Yao Qi wrote:
> Hi Stafford,
> opcodes/ changes should be reviewed in binutils@sourceware.org.

Right, it was late when I sent this and I was working on a gdb bug.  So
just sent it here.  Resent now to binutils list.

> On Wed, Feb 8, 2017 at 4:40 PM, Stafford Horne <shorne@gmail.com> wrote:
> > The buf variable is used after it is free'd.  This causes the lookups to
> > fail and also causes memory corruption.
> >
> > Re-arrange the code a bit to make sure we always free memory before
> > returning. This was caught in openrisc testing, one of the only user of
> > this method.
> >
> > opcodes/ChangeLog:
> >
> > 2017-02-09  Stafford Horne  <shorne@gmail.com>
> >         cgen-opc.c (cgen_lookup_insn): Fix memory corruption issue.
> 
> ChangeLog format issue,
> 
> 017-02-09  Stafford Horne  <shorne@gmail.com>
> 
> * cgen-opc.c (cgen_lookup_insn): Fix memory corruption issue.

Thanks,

-Stafford


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