From nobody Mon Feb 9 17:36:59 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1620398679; cv=none; d=zohomail.com; s=zohoarc; b=e1Scg2CYFIeVjUmDfdAendc1WlGYTrAhCro1ckevsxHUGLyb21drBAUgCXEyKfUIIf6u285RWfbUYfToK6Mb4Vy/TYdDSw9qcIHuUkWzGBOY+IGzbWSqL737u6qyDf+yBeFbyanXVok5npO4qHafkCMtsSG/yTyX1VVzKxQ9vGY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1620398679; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=ZhnR5sl6IQkPWyz310rG2u37bBKdYZca+FWR4sH4smk=; b=itL/PRyQP77M3MemLV3bF96q3zU2blXL7ASYayerpET7CHoM/iuPZjhoFtEikd+bLrIw2ZV6m4eMLuRAcMpWuIOBL8VtjA9Y5BAAsTrxjrHAM2qLXZWnYPzu0NYvWiJePVITNHR5+NZC3tgC4IzOxFC6jmZGlRnWr1Bq+/E7tm8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1620398679457699.532876491135; Fri, 7 May 2021 07:44:39 -0700 (PDT) Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-411-V0OYhUf-PFWJmyJv_oOxgw-1; Fri, 07 May 2021 10:44:36 -0400 Received: by mail-wm1-f71.google.com with SMTP id z9-20020a1c65090000b029014b497b2d98so1458490wmb.8 for ; Fri, 07 May 2021 07:44:36 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (astrasbourg-652-1-219-60.w90-40.abo.wanadoo.fr. [90.40.114.60]) by smtp.gmail.com with ESMTPSA id v21sm13520162wml.5.2021.05.07.07.44.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 May 2021 07:44:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620398678; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZhnR5sl6IQkPWyz310rG2u37bBKdYZca+FWR4sH4smk=; b=hZlCG4MOC8W4RsqFNbKAgaTKXS7QvUpEV528FYKFPpsLXg/eN0neCCi2UnCluoBSoKGE1E grvwSvIJ+WiBcRe0hmwVUgk1jb+oHR3MEyc4cy6Zjq8h6Kw+8NAcSFY88SrdCuHLXAGm9C CL7qER2tyQUbFwyKQHYX8QWU3DoQYlA= X-MC-Unique: V0OYhUf-PFWJmyJv_oOxgw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZhnR5sl6IQkPWyz310rG2u37bBKdYZca+FWR4sH4smk=; b=e78pMAifsOm89XRd1cQ/N1wKlvvzcUAfX7QJTpLwN0X4Nh3yqcq4lE2IJVGHDM8jCa TcEoHrmVi7wb+wJceU12VLoIcw26/KoqfMPgOJrMFOUPVaUwb6jlr9UK46oQx+bufDrZ tlT8q8jJxCHQcZ6jE44pk37DCpSJrL1IPC3EIsKcERMj/MbCQiSWxARixRfKLWC3Ntn6 ccVNyfqBWFYzbqZ8m/spJFyTZZKMdH57ToDHAMJ79Q/eBA+ZpKK5+4v38ygolgpZ4jS/ ZvpAHOhAnLqmoGRVwxib8IWvzB8PjrzZPhsSzOxQAytH5ZW358v4eLsgi2QT0aYAr3uO nNhg== X-Gm-Message-State: AOAM533FnUp2u7hYu67jE0H6bwWlVIzq1SM4KISe0vZLl6wupKt2s+Zx /qCbhl1DzHhh0xmQ9vnW4ZPnR5rgIy6rsIgcMNuFERoJRvIi2aXm08C0lRo/9oQln3/Lg71Srf8 zNVRw04MOeg9USw== X-Received: by 2002:a5d:6981:: with SMTP id g1mr12599753wru.426.1620398675119; Fri, 07 May 2021 07:44:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzy8lnmrGYH8Fsy8pQZm8qEaMhZejrbeQOUztL4n5JHO8452/CrhiGGEhSj68CBg7KRdDUmFg== X-Received: by 2002:a5d:6981:: with SMTP id g1mr12599729wru.426.1620398674953; Fri, 07 May 2021 07:44:34 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Laurent Vivier , Paolo Bonzini , qemu-ppc@nongnu.org, Peter Maydell , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Gerd Hoffmann , qemu-arm@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v3 16/17] configure: Prohibit alloca() by using -Walloca CPPFLAG Date: Fri, 7 May 2021 16:43:14 +0200 Message-Id: <20210507144315.1994337-17-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210507144315.1994337-1-philmd@redhat.com> References: <20210507144315.1994337-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Now that we removed all alloca() calls in the repository, add the -Walloca CPPFLAG to trigger a build failure if such stack allocation is used. Rationale: The ALLOCA(3) man-page mentions its "use is discouraged". Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- As there is an alloca() call in libslirp, this patch is pending on the following libslirp patch to be merged: https://lists.freedesktop.org/archives/slirp/2021-May/000150.html (and the submodule updated). --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 4f374b48890..67cb6d5421c 100755 --- a/configure +++ b/configure @@ -552,7 +552,7 @@ ARFLAGS=3D"${ARFLAGS-rv}" # provides these semantics.) QEMU_CFLAGS=3D"-fno-strict-aliasing -fno-common -fwrapv $QEMU_CFLAGS" QEMU_CFLAGS=3D"-Wundef -Wwrite-strings -Wmissing-prototypes $QEMU_CFLAGS" -QEMU_CFLAGS=3D"-Wstrict-prototypes -Wredundant-decls $QEMU_CFLAGS" +QEMU_CFLAGS=3D"-Wstrict-prototypes -Wredundant-decls -Walloca $QEMU_CFLAGS" QEMU_CFLAGS=3D"-D_GNU_SOURCE -D_FILE_OFFSET_BITS=3D64 -D_LARGEFILE_SOURCE = $QEMU_CFLAGS" =20 # Flags that are needed during configure but later taken care of by Meson --=20 2.26.3