[PATCH] cgen: opcodes: Fix memory corruption in in lookup
Stafford Horne
shorne@gmail.com
Wed Feb 8 21:59:00 GMT 2017
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
More information about the Gdb-patches
mailing list