public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "vmakarov at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/99680] [11 Regression] AddressSanitizer: global-buffer-overflow since g:04b4828c6dd2
Date: Sat, 20 Mar 2021 16:11:01 +0000	[thread overview]
Message-ID: <bug-99680-4-8qaLqzNgsO@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-99680-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99680

--- Comment #5 from Vladimir Makarov <vmakarov at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #4)
> I was worried that letters that introduce multi-letter constraints followed
> by '\0' could be a problem too.  Or do we rely on those being dropped
> already earlier?
> Something like "=B" on x86_64 etc.  In what I've tried it was dropped during
> vregs pass though.
> And when cn already is CONSTRAINT__UNKNOWN, performing checks whether to set
> it to CONSTRAINT__UNKNOWN is just wasted time.

I like more direct approach.  Just looking at CONSTRAINT_LEN.  Multichracter
constraints returns their length, all others (including modifiers and '\0')
returns 1.  Using CONSTRAINT__UNKNOWN adds one more function
(lookup_constraint) in the decision chain.

If somebody uses starting character of multi-character constraint without all
constraint characters, a lot of things will be broken at least in RA.  If this
happens RA will read besides constraint string anyway in other RA code places
and also RA will also consider garbage after the string as additional
constraints and make unwanted reloads. Reading behind constraint string in
process_address_1 would have less serious consequences.

  parent reply	other threads:[~2021-03-20 16:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-20 11:53 [Bug rtl-optimization/99680] New: " marxin at gcc dot gnu.org
2021-03-20 11:54 ` [Bug rtl-optimization/99680] " marxin at gcc dot gnu.org
2021-03-20 12:52 ` jakub at gcc dot gnu.org
2021-03-20 13:54 ` vmakarov at gcc dot gnu.org
2021-03-20 14:52 ` cvs-commit at gcc dot gnu.org
2021-03-20 15:28 ` jakub at gcc dot gnu.org
2021-03-20 16:11 ` vmakarov at gcc dot gnu.org [this message]
2021-03-23 10:38 ` jakub at gcc dot gnu.org

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=bug-99680-4-8qaLqzNgsO@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).