From nobody Wed May 15 04:19:43 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1576360192; cv=none; d=zohomail.com; s=zohoarc; b=bA4VEGYckHGiDDAqsyEn3FKB9gn2LapBUfwaigegoo374HbpCXyIvwk0O4pZWCB+vzi2xGxGwCdZc5v52jbWHaeqhoA8DyLCrMGiHOC5VyQHrw5kYIyMbhqEIajMar56PEui3u2/ycmHAlH636e3wYgalJCRshZV+bNOfXHdvMg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576360192; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=iLwTzvxgZxItXqRILy7QL+77t/kss8ZIqSYDvzpk2MI=; b=OIGJP6twP4bGSHIn++XH2H8SwCOpy8uaacyn5D6kzEVn3Pa1StTE3f57mOouN9w+rHtQJy3GdCgLenG6AZ7OzJMDPl23YSgln0hhMiJMRjFlgR++e1oWKnyLI30HMCErrtO9x0v5zZolJiqR2fZPuHqH04+/sDF+gpd0VUolhGk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 157636019210577.77358059203243; Sat, 14 Dec 2019 13:49:52 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-283-aYB2VBjCPKyTxKWhxNQJNQ-1; Sat, 14 Dec 2019 16:49:47 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 04898DB21; Sat, 14 Dec 2019 21:49:41 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 27914100164D; Sat, 14 Dec 2019 21:49:39 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 018AC1857E; Sat, 14 Dec 2019 21:49:34 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xBELnV7T027019 for ; Sat, 14 Dec 2019 16:49:31 -0500 Received: by smtp.corp.redhat.com (Postfix) id EB8805D9C9; Sat, 14 Dec 2019 21:49:31 +0000 (UTC) Received: from icr.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 745575D9CA for ; Sat, 14 Dec 2019 21:49:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576360190; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=iLwTzvxgZxItXqRILy7QL+77t/kss8ZIqSYDvzpk2MI=; b=e1lBWPtbyvrLxJ51d52a94AvnXoJjloeXG+p+oWZ8AJBS/zmImuIZcxHbI8BBncIgcssHz CA2JINmEVIUtwZamTsSWqJ915dkB6us0aitRpKgUoR6Cy/YNb1ZeFV424L7gKa3ANAzG5i yMdQeyQ9bc8z0y/Q1Gi2s/gGF7Ar+4U= From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Sat, 14 Dec 2019 22:49:22 +0100 Message-Id: <0b79370a3ef7899932b6fe3f48ac89d165059c06.1576359615.git.jtomko@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/2] build: warn on a large frame by default X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: aYB2VBjCPKyTxKWhxNQJNQ-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) My commit e73889b6311f5b43d859caa4bae84bfdb299967a split the -Wframe-larger-than warning setting into two different variables - STRICT_FRAME_LIMIT_CFLAGS for the library code and RELAXED_FRAME_LIMIT_CFLAGS which was needed for tests. Use the strict limit by default and specify the warning flag twice for the parts that require a larger stack frame, relying on the fact that the compiler will pick up the latter value. Signed-off-by: J=C3=A1n Tomko Reviewed-by: Daniel Henrique Barboza --- m4/virt-compile-warnings.m4 | 2 +- src/Makefile.am | 2 -- tools/Makefile.am | 2 -- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/m4/virt-compile-warnings.m4 b/m4/virt-compile-warnings.m4 index be5dc3de51..5f930756b0 100644 --- a/m4/virt-compile-warnings.m4 +++ b/m4/virt-compile-warnings.m4 @@ -171,7 +171,7 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[ # This should be < 256 really. Currently we're down to 4096, # but using 1024 bytes sized buffers (mostly for virStrerror) # stops us from going down further - gl_WARN_ADD([-Wframe-larger-than=3D4096], [STRICT_FRAME_LIMIT_CFLAGS]) + wantwarn=3D"$wantwarn -Wframe-larger-than=3D4096" gl_WARN_ADD([-Wframe-larger-than=3D32768], [RELAXED_FRAME_LIMIT_CFLAGS= ]) =20 # Extra special flags diff --git a/src/Makefile.am b/src/Makefile.am index 0267f16625..15480d7b9a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -31,8 +31,6 @@ AM_CPPFLAGS =3D -I../gnulib/lib \ -Dabs_top_srcdir=3D"\"$(abs_top_srcdir)\"" \ $(NULL) =20 -WARN_CFLAGS +=3D $(STRICT_FRAME_LIMIT_CFLAGS) - AM_CFLAGS =3D $(LIBXML_CFLAGS) \ $(GLIB_CFLAGS) \ $(WARN_CFLAGS) \ diff --git a/tools/Makefile.am b/tools/Makefile.am index 67b342d306..426a6ba661 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -29,8 +29,6 @@ AM_CPPFLAGS =3D \ # needed STANDALONE_CPPFLAGS =3D -I$(top_srcdir) =20 -WARN_CFLAGS +=3D $(STRICT_FRAME_LIMIT_CFLAGS) - AM_CFLAGS =3D \ $(WARN_CFLAGS) \ $(COVERAGE_CFLAGS) \ --=20 2.19.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed May 15 04:19:43 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1576360220; cv=none; d=zohomail.com; s=zohoarc; b=f5WxpreIZlAYRlDn2oJwF8PiBVsEeERuQMziKPgmCXyTlB4AMqscVL6Q0buW8P4asMkENSyMP0CMhLyumNdQsy8jl5Dl13J644oXXcyaCFY8cSKbWwGB/+KWGcyjGJSIIM1H9n6LMcYqLcQZIdrB8YkuFicwkIR6GPP5XjuOl70= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576360220; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Ozq5l7MMTYcw4+A+JN36uemK13iFAiFYxfz2Rba1CKc=; b=DWy5jmOIC/ElQAIPiBh3KlZbgN0x2hb4NAX5SBkAS1+M09OZsaXLu1VvAXx4WVzyXnyHT+XRJWWfhIJsv4lTCKnMd9Hnuvljb8pqAJU8R9lixD4G+NCm/Rd0WNhroWq5Ly+2mxLtn0ClPBEirxiTRFAKxMMCRy+Is6h5+a/SYM0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 1576360220674594.5693262455776; Sat, 14 Dec 2019 13:50:20 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-236--C2-pobIMteCO7XJkMW4rg-1; Sat, 14 Dec 2019 16:50:16 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2EBEE107ACC5; Sat, 14 Dec 2019 21:50:11 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E2C091A8E2; Sat, 14 Dec 2019 21:50:10 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 557B71809567; Sat, 14 Dec 2019 21:50:10 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xBELnWWl027025 for ; Sat, 14 Dec 2019 16:49:32 -0500 Received: by smtp.corp.redhat.com (Postfix) id BBCAB5D9CA; Sat, 14 Dec 2019 21:49:32 +0000 (UTC) Received: from icr.redhat.com (unknown [10.43.2.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 445065D9C9 for ; Sat, 14 Dec 2019 21:49:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576360219; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=Ozq5l7MMTYcw4+A+JN36uemK13iFAiFYxfz2Rba1CKc=; b=DAqQcZPq9uBqDyb/t7uVAa1BeClxLtBxROunPd6EIsaY/yc3wyNu78D4NrR30ParE4e/LN StYc/LtUQ/u5Cca6VypFlR+ygiF8J2eC1b4/KCOsJBnJ0nr+aIgpp4ybCviIbQQVf1DmCh 1YL6eNXErJPTanHgJiroK0FoulgQLK4= From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Sat, 14 Dec 2019 22:49:23 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/2] build: relax the relaxed stack frame limit further X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: -C2-pobIMteCO7XJkMW4rg-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Pick 256k as the limit. While -Wno-frame-larger-than would make more sense for usage in our test suite, the -Wno version seems to have no effect if -Wframe-larger-than was already specified. Use an (un)reasonably large value instead. Fixes the build with clang: ../../tests/cputest.c:964:1: error: stack frame size of 33176 bytes in function 'mymain' [-Werror,-Wframe-larger-than=3D] mymain(void) ^ 1 error generated. Signed-off-by: J=C3=A1n Tomko Reviewed-by: Daniel Henrique Barboza --- m4/virt-compile-warnings.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/m4/virt-compile-warnings.m4 b/m4/virt-compile-warnings.m4 index 5f930756b0..fc0b9bfa55 100644 --- a/m4/virt-compile-warnings.m4 +++ b/m4/virt-compile-warnings.m4 @@ -172,7 +172,7 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[ # but using 1024 bytes sized buffers (mostly for virStrerror) # stops us from going down further wantwarn=3D"$wantwarn -Wframe-larger-than=3D4096" - gl_WARN_ADD([-Wframe-larger-than=3D32768], [RELAXED_FRAME_LIMIT_CFLAGS= ]) + gl_WARN_ADD([-Wframe-larger-than=3D262144], [RELAXED_FRAME_LIMIT_CFLAG= S]) =20 # Extra special flags dnl -fstack-protector stuff passes gl_WARN_ADD with gcc --=20 2.19.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list