Received: by 2002:a17:505:6015:b0:1be9:327d:8ee3 with SMTP id us21csp488092njc; Thu, 5 Jun 2025 12:36:36 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXnPV+sfd5eAYa/dyH6tktbFFyo9R+2PwkaeAhpNztQ5Q3xtTBKxUuhPyjvt2Geavu4zDLWdqbPb1fanw==@linaro.org X-Google-Smtp-Source: AGHT+IGD5S5BsAChelw8Eh7Yu8k8PCLJIwmYUOz1yAIPuf7uxASjvnekdGY8RPvMfkyU5ruT+i1D X-Received: by 2002:a05:620a:40cc:b0:7c9:5eca:ea3b with SMTP id af79cd13be357-7d229887d10mr136195685a.31.1749152195908; Thu, 05 Jun 2025 12:36:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1749152195; cv=none; d=google.com; s=arc-20240605; b=L/UUPejHGAGppasbYOll2ryAwH0lUk4zQDQjXeVONrETngMii6zqiyqyN3VxynBIi4 2Aa7DPO1wGJ9HHLENRZcq64f3/jWpSPzdWsDrVgoLUuoZ1W2kNpG+eskZMO7KRbj+wtZ 208Y4IrDRcZIZ4/8GznHHBEHO8JC/sLbNoXBADhqBUGGPfdh3f4S2ACXPvB9ymNye3TO cF7cK4boNPC0uXSLeGFf1j/O26XNm3MZZTx1fnn5SO8gB8SfqTEyclTGlJZlMtX8YW2k mHE09nD71JE+bBulvBwuWqLBuMnfzEOSfT9bxxiX0s/9xAtizocSr4XqqblQGMpCGkBT L5jQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to: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 :from:dkim-signature; bh=rl1Q+tx40XbBr5+knuEz+9jWMcm+8B54eODQxezOx1g=; fh=4h8nYkqSZR/NsvEVgsamRLVoGtMitGyEZZrWhPRdZB0=; b=HDFIw3Uh5w0oQ8fTWuXdH58AOOvHOkBvPAw/ilBGuTA3o2RxoF6pFffgnviTodnqvA HE2PNNOP9WAGqSR7fXL1y6Ee/SZKfqTAsRcIib0Y9c6pnCqb4iZjv/IKEQY8ItBWUBNt q0lSHEcSCmMJmxkXUmBYn426Ev6E+41dgu5atW+EthGVVUauliHUvVsIaIvPTuPnMW6Q Gwqc03NYbfXC56avQEdyl+HQYBDkfh+nmyfvpY++fCORjT9BN3Wm4yPttWGMJSKyQd36 9tM0eE1HrLBcBNGP+E9qTvzgTQBfQPRDLLWkFViR5ayQEi/SUyOsOeU+LJnQ9FmS5lbw lsig==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kUBllly4; spf=pass (google.com: domain of qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7d2669bff69si12080785a.565.2025.06.05.12.36.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 05 Jun 2025 12:36:35 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kUBllly4; spf=pass (google.com: domain of qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uNGNo-0006oj-K7; Thu, 05 Jun 2025 15:36:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uNGNl-0006n5-1Z for qemu-devel@nongnu.org; Thu, 05 Jun 2025 15:36:09 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uNGNi-00018X-J0 for qemu-devel@nongnu.org; Thu, 05 Jun 2025 15:36:08 -0400 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-450cea01b9cso4672745e9.0 for ; Thu, 05 Jun 2025 12:36:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1749152165; x=1749756965; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=rl1Q+tx40XbBr5+knuEz+9jWMcm+8B54eODQxezOx1g=; b=kUBllly4LO2LIc/Kh7eZ/AZg5veY02yZ7suMxHAPpCWvFUsheBPee5x1ZYoJDdpFsN +vrFVPtoKcL2zMOqsVWeU83UpaYxfDZQQdorIUnzi/wE0d2cENpOurmbHihw/1agQBcg WEiVWg0dEN2xQLU0+uuNiVfT72IvLng+RV25c+tDzUr/LwbNICNmH81ln0wSci0Jyhlu bofxJRK17elnZQ0y5pKFqkL1SK/hNmGylDfyCZjANpOO/tGldd2OPFSViOLItbQfjIRF 9iuVZCVaTgkVm7GYNgCTnSC6qsAIWGAAUeioU294+EXOAeF3AamTME/CM7Y4/hG6pB/c GTxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749152165; x=1749756965; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rl1Q+tx40XbBr5+knuEz+9jWMcm+8B54eODQxezOx1g=; b=Tugr9JD5+eTRYp667aoii9T1VfHIZlfOXBCY84t7EeryesuBNZh5gCdIdYgEOB4oV+ Z1nnUMZWHc1RFEsaIVrChuG0XohSgQ2/XB+/vH1lNePBjFoG39pGFnFm7mQZZPyMHLHF a9rXK6S+RFbJ2B/U2b6twMWDmNxaDI6wjDSOTAAkNnOMgMx0oSBlWHp9Cfu0qBCuDt+6 9lSr0zs4ZLHh8vu+CR+eks9+D69akge3KsS5bKop73hICbeg2IJX8OPi05DJbsHyFwV0 Hl3SWv+Lrhmx8zi5vCdYbL3lkqX4eR/Q5Tl+kH4x56nm5N2pBAIru6AvMWFCpTsjgubD IFTg== X-Gm-Message-State: AOJu0YxeiJi83yMpeCD8V93qKltYD4EhU5JiJiatp2QYWzYJFMui13GV 1LjQnpONOAGEYkwjo3fsyRoFGbmWLQNMWy8ruCqOUuU580Yo5BR+WEsxcaLl9t3gnNqsN5J9jF+ RSIC32Ds= X-Gm-Gg: ASbGncsMBiwc0KvA+AN9661BQcceU6eCecEOoCltxkU2pbZR4GJNDbH958FzgIUMdfR Ky6InlOjiRk2MC72mZXIffGOT9UUwZIgm5ej8ipQVTmzJOjj8WA3MoknGBR84KAlWEU3ItM8F5v TN/w9D2lquY5c53mHvH55WEi/BKsWkf10H6HbBtj9FqHvdYeD7cuJjgeQ5SDSnUlaMp3QTAJDpl VX2iuqeuSCOhfTT1eTyXB+T5Q6DiZspJiCCVB/692djBicKtRIbuAH5+rclA792mOiNgmEkUSLG nXyMjp/1UT63/EIU5jKqbN/8981VixNVy11+aoWd2COYSrpGA1Zr/yyGonYOtggoVL6ZvJWeqP/ m4l+4GZITXV2trall4I6slwC25lBEhurOHD19 X-Received: by 2002:a05:6000:1ac6:b0:3a5:2f23:377d with SMTP id ffacd0b85a97d-3a531cb1037mr317670f8f.50.1749152164760; Thu, 05 Jun 2025 12:36:04 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-452137258bdsm2246645e9.27.2025.06.05.12.36.02 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 05 Jun 2025 12:36:03 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, Paolo Bonzini , qemu-arm@nongnu.org, Glenn Miles , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Peter Maydell , Stefan Hajnoczi , Stefan Berger , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=20=2E=20Berrang=C3=A9?= Subject: [RFC PATCH 4/4] buildsys: Prohibit alloca() use on system code Date: Thu, 5 Jun 2025 21:35:40 +0200 Message-ID: <20250605193540.59874-5-philmd@linaro.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250605193540.59874-1-philmd@linaro.org> References: <20250605193540.59874-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=philmd@linaro.org; helo=mail-wm1-x332.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org Sender: qemu-devel-bounces+alex.bennee=linaro.org@nongnu.org X-TUID: azyXpy5Cg3aM Similarly to commit 64c1a544352 ("meson: Enable -Wvla") with variable length arrays, forbid alloca() uses on system code. There are few uses on ancient linux-user code, do not bother there. Signed-off-by: Philippe Mathieu-Daudé --- meson.build | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/meson.build b/meson.build index ef994676fe9..8c6ccb03c71 100644 --- a/meson.build +++ b/meson.build @@ -774,6 +774,10 @@ if host_os != 'darwin' endif endif +if have_system + warn_flags += ['-Walloca'] +endif + # Set up C++ compiler flags qemu_cxxflags = [] if 'cpp' in all_languages -- 2.49.0