[PATCH][GCC][AArch64] Cleanup the AArch64 testsuite when stack-clash is on [Patch (7/7)]
Tamar Christina
Tamar.Christina@arm.com
Tue Aug 28 12:19:00 GMT 2018
Hi All,
Since this patch series now contains SVE support I am removing the changes
to the SVE tests in this patch series. I assume the OK still stands as the
only change here is undoing updates to three files.
Thanks,
Tamar
gcc/testsuite/
2018-08-28 Tamar Christina <tamar.christina@arm.com>
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-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.
> -----Original Message-----
> From: Jeff Law <law@redhat.com>
> Sent: Friday, August 3, 2018 19:30
> To: Tamar Christina <Tamar.Christina@arm.com>; gcc-patches@gcc.gnu.org
> Cc: nd <nd@arm.com>; James Greenhalgh <James.Greenhalgh@arm.com>;
> Richard Earnshaw <Richard.Earnshaw@arm.com>; Marcus Shawcroft
> <Marcus.Shawcroft@arm.com>
> Subject: Re: [PATCH][GCC][AArch64] Cleanup the AArch64 testsuite when
> stack-clash is on [Patch (6/6)]
>
> On 07/24/2018 04:28 AM, tamar.christina@arm.com wrote:
> > Hi All,
> >
> > 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:
> >
> > * sve: We don't yet support stack-clash-protection and sve, so for now turn
> these off.
> > * 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.
> >
> > Bootstrapped Regtested on aarch64-none-linux-gnu, x86_64-pc-linux-gnu
> and no issues.
> > Both targets were tested with stack clash on and off by default.
> >
> > Ok for trunk?
> >
> > Thanks,
> > Tamar
> >
> > gcc/testsuite/
> > 2018-07-24 Tamar Christina <tamar.christina@arm.com>
> >
> > 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.target/aarch64/sve/mask_struct_load_3.c: Likewise.
> > * gcc.target/aarch64/sve/mask_struct_store_3.c: Likewise.
> > * gcc.target/aarch64/sve/mask_struct_store_4.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-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.
> >
> >> -----Original Message-----
> >> From: Tamar Christina <tamar.christina@arm.com>
> >> Sent: Wednesday, July 11, 2018 12:23
> >> To: gcc-patches@gcc.gnu.org
> >> Cc: nd <nd@arm.com>; James Greenhalgh
> <James.Greenhalgh@arm.com>;
> >> Richard Earnshaw <Richard.Earnshaw@arm.com>; Marcus Shawcroft
> >> <Marcus.Shawcroft@arm.com>
> >> Subject: [PATCH][GCC][AArch64] Cleanup the AArch64 testsuite when
> >> stack- clash is on [Patch (6/6)]
> >>
> >> Hi All,
> >>
> >> 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:
> >>
> >> * sve: We don't yet support stack-clash-protection and sve, so for
> >> now turn these off.
> >> * 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.
> >>
> >> Bootstrapped Regtested on aarch64-none-linux-gnu, x86_64-pc-linux-gnu
> >> and no issues.
> >> Both targets were tested with stack clash on and off by default.
> >>
> >> Ok for trunk?
> >>
> >> Thanks,
> >> Tamar
> >>
> >> gcc/testsuite/
> >> 2018-07-11 Tamar Christina <tamar.christina@arm.com>
> >>
> >> 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.target/aarch64/sve/mask_struct_load_3.c: Likewise.
> >> gcc.target/aarch64/sve/mask_struct_store_3.c: Likewise.
> >> gcc.target/aarch64/sve/mask_struct_store_4.c: Likewise.
> >> gcc.dg/params/blocksort-part.c: Skip stack-clash checks
> >> on AArch64.
>
> This is fine. FWIW, I'd been ignoring vla-1 and one or two others that were
> clearly invalid if stack-clash were on by default locally, but didn't push any
> kind of patch for that upstream since I didn't think anyone builds with stack-
> clash on by default (I did for testing purposes of course).
>
> Jeff
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rb9301.patch
Type: text/x-diff
Size: 5753 bytes
Desc: rb9301.patch
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20180828/b214f4f8/attachment.bin>
More information about the Gcc-patches
mailing list