From: Pedro Alves <palves@redhat.com>
To: Roland McGrath <mcgrathr@google.com>
Cc: "H.J. Lu" <hjl.tools@gmail.com>,
"binutils@sourceware.org" <binutils@sourceware.org>,
GDB <gdb-patches@sourceware.org>,
Bradley Nelson <bradnelson@google.com>
Subject: Re: [PATCH] Fix buffer underrun in i386-dis.c.
Date: Thu, 09 Jan 2014 19:03:00 -0000 [thread overview]
Message-ID: <52CEF27C.5040403@redhat.com> (raw)
In-Reply-To: <CAMe9rOrf6V5g5DL7-7McsLL=L+F3AkUjZj=b-WPOGKEmf+OV0w@mail.gmail.com>
On 01/09/2014 06:31 PM, H.J. Lu wrote:
> On Thu, Jan 9, 2014 at 10:26 AM, Roland McGrath <mcgrathr@google.com> wrote:
>> When disassembling any instruction without a REX prefix, the print_insn
>> function touches all_prefixes[-1]. This is usually harmless in most
>> builds, because the word preceding all_prefixes will probably be the
>> last_seg_prefix variable and it was usually zero already. But in some
>> kinds of builds, all buffer underruns are caught and cause a crash.
>>
>> AFAICT the obvious local workaround is in fact the proper fix. In the
>> similar cases nearby, there is a PREFIX_FOO bit in the "prefixes" bitmask
>> that guards use of last_foo_prefix. But there is no such bit for the REX
>> prefixes. We could test "rex != 0" instead, I suppose.
>>
>> OK for trunk and binutils-2.24 branch and gdb-7.7 branch?
>
> OK for trunk and binutils-2.24 branch.
In that case, OK for gdb-7.7 too.
--
Pedro Alves
next prev parent reply other threads:[~2014-01-09 19:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-09 18:26 Roland McGrath
2014-01-09 18:31 ` H.J. Lu
2014-01-09 19:03 ` Pedro Alves [this message]
2014-01-09 19:28 ` Roland McGrath
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=52CEF27C.5040403@redhat.com \
--to=palves@redhat.com \
--cc=binutils@sourceware.org \
--cc=bradnelson@google.com \
--cc=gdb-patches@sourceware.org \
--cc=hjl.tools@gmail.com \
--cc=mcgrathr@google.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).