re PR sanitizer/88291 (asan ICE in asan_clear_shadow)
authorJakub Jelinek <jakub@redhat.com>
Sun, 2 Dec 2018 12:39:26 +0000 (13:39 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Sun, 2 Dec 2018 12:39:26 +0000 (13:39 +0100)
commite80944753d325ef009acf58a5b3188936997d22b
tree60c300b077aa69323c05bd819f079de56fc173cd
parentfaa867f5a8b74b5eaef3066debc015dc888237cb
re PR sanitizer/88291 (asan ICE in asan_clear_shadow)

PR sanitizer/88291
* asan.c (asan_clear_shadow): Move assert that len is multiple of 4
to the start of the function.
(asan_emit_stack_protection): When emitting clearing sequence for
epilogue, align offset down to ASAN_RED_ZONE_SIZE granularity,
add last_size_aligned which is last_size padded to multiples of
ASAN_RED_ZONE_SIZE and emit asan_clear_shadow always on 4 byte
boundaries.

* c-c++-common/asan/pr88291.c: New test.

From-SVN: r266721
gcc/ChangeLog
gcc/asan.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/asan/pr88291.c [new file with mode: 0644]