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

--- Comment #7 from Tamar Christina <tnfchris at gcc dot gnu.org> ---
Author: tnfchris
Date: Mon Oct  1 13:05:30 2018
New Revision: 264754

URL: https://gcc.gnu.org/viewcvs?rev=264754&root=gcc&view=rev
Log:
Cleanup the AArch64 testsuite when stack-clash is on.

This patch cleans up the testsuite when a run is done with stack clash
protection turned on.

Concretely this switches off -fstack-clash-protection for a couple of tests:

* assembler scan: some tests are quite fragile in that they check for exact
       assembly output, e.g. check for exact amount of sub etc.  These won't
       match now.
* vla: Some of the ubsan tests negative array indices. Because the arrays
weren't
       used before the incorrect $sp wouldn't have been used. The correct value
is
       restored on ret.  Now however we probe the $sp which causes a segfault.
* params: When testing the parameters we have to skip these on AArch64 because
of our
          custom constraints on them.  We already test them separately so this
isn't a
          loss.

Note that the testsuite is not entire clean due to gdb failure caused by alloca
with
stack clash. On AArch64 we output an incorrect .loc directive, but this is
already the
case with the current implementation in GCC and is a bug unrelated to this
patch series.

gcc/testsuite/

        PR target/86486
        * gcc.dg/pr82788.c: Skip for AArch64.
        * gcc.dg/guality/vla-1.c: Turn off stack-clash.
        * gcc.target/aarch64/subsp.c: Likewise.
        * gcc.dg/params/blocksort-part.c: Skip stack-clash checks
        on AArch64.
        * gcc.dg/stack-check-10.c: Add AArch64 specific checks.
        * gcc.dg/stack-check-12.c: ILP32 fixup.
        * gcc.dg/stack-check-5.c: Add AArch64 specific checks.
        * gcc.dg/stack-check-6a.c: Skip on AArch64, we don't support this.
        * testsuite/lib/target-supports.exp
        (check_effective_target_frame_pointer_for_non_leaf): AArch64 does not
        require frame pointer for non-leaf functions.


Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/c-c++-common/ubsan/vla-1.c
    trunk/gcc/testsuite/gcc.dg/params/blocksort-part.c
    trunk/gcc/testsuite/gcc.dg/pr82788.c
    trunk/gcc/testsuite/gcc.dg/stack-check-10.c
    trunk/gcc/testsuite/gcc.dg/stack-check-5.c
    trunk/gcc/testsuite/gcc.dg/stack-check-6a.c
    trunk/gcc/testsuite/gcc.target/aarch64/stack-check-12.c
    trunk/gcc/testsuite/gcc.target/aarch64/subsp.c
    trunk/gcc/testsuite/lib/target-supports.exp

Reply via email to