public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: "Martin Liška" <mliska@suse.cz>
Cc: gcc-patches@gcc.gnu.org, arnd@linaro.org
Subject: Re: [PATCH] Come up with --param asan-stack-small-redzone (PR sanitizer/81715).
Date: Thu, 29 Nov 2018 16:50:00 -0000	[thread overview]
Message-ID: <20181129164650.GQ12380@tucnak> (raw)
In-Reply-To: <2bbba0d0-e4a7-8d29-5f76-15da053cc786@suse.cz>

On Thu, Nov 29, 2018 at 05:37:11PM +0100, Martin Liška wrote:
>   0x10007fff7b00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>   0x10007fff7b10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>   0x10007fff7b20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>   0x10007fff7b30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>   0x10007fff7b40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> =>0x10007fff7b50: 00 00 00 00 f1 f1 f1 f1[01]f2 00 00 01 f2 f2 f2
>   0x10007fff7b60: f2 f2 00 00 00 06 f2 f2 f2 f2 00 00 00 00 00 f3
>   0x10007fff7b70: f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00
>   0x10007fff7b80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>   0x10007fff7b90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>   0x10007fff7ba0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> 
> as seen 06f2f2f2 is completely unaligned write.

Sure, but the whole frame section where the vars from one function are
is properly aligned.  So, you shouldn't store 0xf2f2f206, but 0xf2f20600
one byte earlier, and then 0x0000f2f2 after it.  Of course, if we decide
that we want to do solely SImode stores.  If we want to complicate it
through determining costs and comparing if we should do a 1 or 2 or 4 byte
store and if unaligned is possible and not very expensive consider even
those in some cases, the code might be more complex.
I guess for now I'd be fine with SImode stores only and if we get complains,
we can address that incrementally (the question is if we'd want hooks or
what to determine it).

	Jakub

  reply	other threads:[~2018-11-29 16:50 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-25  9:05 Martin Liška
2018-09-25  9:49 ` Jakub Jelinek
2018-09-25 10:17   ` Martin Liška
2018-09-25 10:25     ` Martin Liška
2018-09-25 12:19     ` Jakub Jelinek
2018-09-25 15:40       ` Martin Liška
2018-09-25 15:55         ` Jakub Jelinek
2018-09-26  9:34           ` Martin Liška
2018-10-09  8:53             ` Martin Liška
2018-10-23  9:17               ` Martin Liška
2018-11-13  7:50                 ` Martin Liška
2018-11-28 12:01             ` Jakub Jelinek
2018-11-29 15:03               ` Martin Liška
2018-11-29 15:17                 ` Jakub Jelinek
2018-11-29 16:37                   ` Martin Liška
2018-11-29 16:50                     ` Jakub Jelinek [this message]
2018-11-30 11:44                       ` Martin Liška
2018-11-30 12:01                         ` Jakub Jelinek
2018-12-01  7:36                         ` [PATCH] Partial fix for asan on big endian targets (PR sanitizer/88289) Jakub Jelinek
2018-12-02 12:46                           ` [committed] Fix ICE in asan_clear_shadow (PR sanitizer/88291) Jakub Jelinek

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=20181129164650.GQ12380@tucnak \
    --to=jakub@redhat.com \
    --cc=arnd@linaro.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=mliska@suse.cz \
    /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).