From patchwork Wed Mar 1 18:07:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xi Ruoyao X-Patchwork-Id: 63025 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp3788306wrd; Wed, 1 Mar 2023 10:16:25 -0800 (PST) X-Google-Smtp-Source: AK7set8EHX3bROVUI0Ug1KDe/1tFGUP9UpHq8q86xAx6ROG7/ujvJGI0MYQXObchrFZT2rK0UIZi X-Received: by 2002:aa7:cb89:0:b0:4b1:2041:f8b2 with SMTP id r9-20020aa7cb89000000b004b12041f8b2mr7801642edt.15.1677694585293; Wed, 01 Mar 2023 10:16:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677694585; cv=none; d=google.com; s=arc-20160816; b=Z5Wu1FYKh7zPEOSpORIKoBBvBNaUG2NMkRFN4/gyn/sWHOSkVLQRg73uSncvk8+aia ry6N6/JyZ0t1XV7SwGSb5m45IWmqfzydFw6ECTl7C2CF/Sr+NPTf5wq1K4fiY32XzmVH T68+lHpyjsEjxsn9HSMkF3aVx80np5Q0mkjmpwT9lmlvwp2/PzOlKYB3jyBsCsdqunU9 zGXIjo+HqFT3tcYr1cmDnAdGpkW9Z60F2AHY9AHCxXJwjhVlEFYxzxsxSh8Mwv/vpfVu fnQ9wCX+oyWUnUZW+g/rl5JspMa9TwRqqMV65Xjg01XGwfBGTTXoUJRyT0ZkWUhVtGGm vJ1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=fNYIe43zBZUN26hw0fawcD9MI8NXz+qiixouQRv+tHk=; b=o/tFPGpv8aU2RGl6mZk8VCGRA+yq7jU1zYAtfq8bEZAwatKHLgFXVsdSyhbI4IdTCV RR48IHRinboJMkhBcebajjWLOiCTEH/o47/YsoR8SN7pWNNUwB0OTxT0/E2agJXLQ8Af fHJrYpdqXwQyy8Mv1MW4PJywstSb7WPHKXISi38pQeYN52Y2ZPPQcgMo9I3QhFYNXhus FCbFoUc5Geja6mboBfqqtn+QeVEDGAJ5gzjg4yCmyX4F5i5hrmNPKw6TUF9sJwAEfVFI sDKqimTr59Vv9a/E60TGlOvNNFsz574ccGjA92ZFSnhNJcJGYA8OsvgacqAXYxV4qolM +EvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=Ay0X1Gsx; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id hx19-20020a170906847300b008d3ed94dedcsi1808060ejc.550.2023.03.01.10.16.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Mar 2023 10:16:25 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=Ay0X1Gsx; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 990A5383F416 for ; Wed, 1 Mar 2023 18:11:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 990A5383F416 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677694318; bh=fNYIe43zBZUN26hw0fawcD9MI8NXz+qiixouQRv+tHk=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=Ay0X1GsxgIToWpmM9y2tb6vcnnPs5estTLcaRALm3L8jrTXNUzdCEC3qvMWaad4q7 +mfqYoB8wNdYc4Pm/M04G41VA9V0oL1+J2bqItDyx6kDe0tsRYPAmpz7Yh0FtwCP42 7oCjeVJPdQQuept7oFoUos+jZ5eBMkMFmQbT/SJQ= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from xry111.site (xry111.site [IPv6:2001:470:683e::1]) by sourceware.org (Postfix) with ESMTPS id 5B045385B533 for ; Wed, 1 Mar 2023 18:08:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5B045385B533 Received: from stargazer.. (unknown [IPv6:240e:358:113f:d600:dc73:854d:832e:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id 7B79E65DC8; Wed, 1 Mar 2023 13:07:58 -0500 (EST) To: gcc-patches@gcc.gnu.org Cc: Richard Sandiford , Xi Ruoyao Subject: [PATCH 8/8] aarch64: testsuite: disable stack protector for tests relying on stack offset Date: Thu, 2 Mar 2023 02:07:20 +0800 Message-Id: <20230301180720.26514-9-xry111@xry111.site> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230301180720.26514-1-xry111@xry111.site> References: <20230301180720.26514-1-xry111@xry111.site> MIME-Version: 1.0 X-Spam-Status: No, score=-8.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, LIKELY_SPAM_FROM, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Xi Ruoyao via Gcc-patches From: Xi Ruoyao Reply-To: Xi Ruoyao Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759190277467911163?= X-GMAIL-MSGID: =?utf-8?q?1759190277467911163?= Stack protector needs a guard value on the stack and change the stack layout. So we need to disable it for those tests, to avoid test failure with --enable-default-ssp. gcc/testsuite/ChangeLog: * gcc.target/aarch64/shrink_wrap_1.c (dg-options): Add -fno-stack-protector. * gcc.target/aarch64/stack-check-cfa-1.c (dg-options): Add -fno-stack-protector. * gcc.target/aarch64/stack-check-cfa-2.c (dg-options): Add -fno-stack-protector. * gcc.target/aarch64/test_frame_17.c (dg-options): Add -fno-stack-protector. --- gcc/testsuite/gcc.target/aarch64/shrink_wrap_1.c | 2 +- gcc/testsuite/gcc.target/aarch64/stack-check-cfa-1.c | 2 +- gcc/testsuite/gcc.target/aarch64/stack-check-cfa-2.c | 2 +- gcc/testsuite/gcc.target/aarch64/test_frame_17.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gcc/testsuite/gcc.target/aarch64/shrink_wrap_1.c b/gcc/testsuite/gcc.target/aarch64/shrink_wrap_1.c index ab7cd74ec3b..067220c04a0 100644 --- a/gcc/testsuite/gcc.target/aarch64/shrink_wrap_1.c +++ b/gcc/testsuite/gcc.target/aarch64/shrink_wrap_1.c @@ -1,5 +1,5 @@ /* { dg-do compile { target { aarch64*-*-* } } } */ -/* { dg-options "-O2" } */ +/* { dg-options "-O2 -fno-stack-protector" } */ /* { dg-final { check-function-bodies "**" "" } } */ /* diff --git a/gcc/testsuite/gcc.target/aarch64/stack-check-cfa-1.c b/gcc/testsuite/gcc.target/aarch64/stack-check-cfa-1.c index 6885894a97e..412a9ed1aab 100644 --- a/gcc/testsuite/gcc.target/aarch64/stack-check-cfa-1.c +++ b/gcc/testsuite/gcc.target/aarch64/stack-check-cfa-1.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16 -funwind-tables" } */ +/* { dg-options "-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16 -funwind-tables -fno-stack-protector" } */ /* { dg-require-effective-target supports_stack_clash_protection } */ #define SIZE 128*1024 diff --git a/gcc/testsuite/gcc.target/aarch64/stack-check-cfa-2.c b/gcc/testsuite/gcc.target/aarch64/stack-check-cfa-2.c index 5796a53be06..e440569a078 100644 --- a/gcc/testsuite/gcc.target/aarch64/stack-check-cfa-2.c +++ b/gcc/testsuite/gcc.target/aarch64/stack-check-cfa-2.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16 -funwind-tables" } */ +/* { dg-options "-O2 -fstack-clash-protection --param stack-clash-protection-guard-size=16 -funwind-tables -fno-stack-protector" } */ /* { dg-require-effective-target supports_stack_clash_protection } */ #define SIZE 1280*1024 + 512 diff --git a/gcc/testsuite/gcc.target/aarch64/test_frame_17.c b/gcc/testsuite/gcc.target/aarch64/test_frame_17.c index 44f13291128..5d432ad0854 100644 --- a/gcc/testsuite/gcc.target/aarch64/test_frame_17.c +++ b/gcc/testsuite/gcc.target/aarch64/test_frame_17.c @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-O2" } */ +/* { dg-options "-O2 -fno-stack-protector" } */ /* Test reuse of stack adjustment temporaries. */