]> git.ipfire.org Git - thirdparty/gcc.git/commit
testsuite: Fix up c-c++-common/asan/asan-stack-small.c test
authorJakub Jelinek <jakub@redhat.com>
Sat, 15 Nov 2025 15:06:05 +0000 (16:06 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Sat, 15 Nov 2025 15:06:05 +0000 (16:06 +0100)
commit77705b475df4e4eed5831bf27e37250db2135fc8
treef686cca7ce5b6eef93523a8f71146e5b93a7471c
parent246ec58c9bc56bf454f7781c2f1b8e72bbe30394
testsuite: Fix up c-c++-common/asan/asan-stack-small.c test

Here is a fix for the test I've talked about today in the libsanitizer
update mail.

The test relied on a coming before b coming before c, all with 32 byte
distances, but gcc can actually emit them in the exact opposite order
or some other one.

2025-11-15  Jakub Jelinek  <jakub@redhat.com>

* c-c++-common/asan/asan-stack-small.c (pa, pb, pc): Make these
vars volatile.
(uintptr_t): New typedef.
(main): Use access of b using pa pointer with offset depending on
how exactly the 3 variables are laid out in the frame.
gcc/testsuite/c-c++-common/asan/asan-stack-small.c