From patchwork Wed Aug 14 17:11:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 819142 Delivered-To: patch@linaro.org Received: by 2002:adf:cd01:0:b0:367:895a:4699 with SMTP id w1csp802605wrm; Wed, 14 Aug 2024 10:13:09 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWmuTCBewgfb6dXiOolyAbqa3iW5RBrcy9jFHCYcxVBZJynoX0cD8jlagcxZNBuefsJsIshDebxo4f0OOCd904m X-Google-Smtp-Source: AGHT+IHDlrfYS8kj1TQjYYvzPs5JXq5itIiiV21Da6YnpFSeDigLj0d/zLH+K6MbhGgeX33HHwqE X-Received: by 2002:a05:620a:2990:b0:7a2:2de:efc7 with SMTP id af79cd13be357-7a4ee31aae9mr399081485a.14.1723655588917; Wed, 14 Aug 2024 10:13:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1723655588; cv=none; d=google.com; s=arc-20160816; b=zBvKwQRZ+zz5eiwRusGmJZ9bCjZclFoc7pkE1Fd2giZ/THLC1Iftpj7VDw9hzpSExH X8BjkT/Qb/4wUM01mBAxCx4eHczcTXYYpX6nC6U20yzTdqwQITzi7V02rWcsuVqpkcZu imFo9En6SYMWLdUr47tqbuUW88txwC6kwTMFs495ttP7zt/bMzLvl3VC8yAuclE/TopZ zEV8mvYgq/l2tVEOK4AycUtFWp1NXVFptlYU7EwPLjMGPtEfivdqNMWdwK8KATArCoJ1 ca7EtImUuqA7y72PiuOOT5TY0TpuHaovjKkU8kh4zGGRtg7POH0PDw8Y/cjSsyguGl3Y 9tew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=CvLg/jdd02raDyPuokVKWkE8Jw8u8gKV/oNxvgJVSos=; fh=2zasdEIMl2g9By/aYULsdPxvg2j0c442hBqLZY0SAzw=; b=n34yC5pp5XBYOHEC+17haUNcUXxj3BiY0OxSDrxvhBNXQxTyUruWXNhUmgHKl34Loy JfBNNDLUie9XWRMaJAdOYxFFyV+E1WGnvyvL3ouRkrvUxUyNrb6SCgDXijozlKGJ42IQ mvCuHCAXtYiBaSzgSMt5QCY7QtUCDaZOn5DK+A9mhXwb5YhSfW9xX0mg/CKx6OLK3C3a FJsvy9P4lGua9Q5NhCp6leyuhgXlcQD30pZzc2Fz60Odt+xcdGoloEM3KxEZdpNToWOa zT4oyZjVztUsBS1nMn2+u+3+zXQIspueY5Fh2EDjnBGsETWdHZoUaxKuY5z6AdA4Wew1 EGpg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uqmmMwyH; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=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-7a4c7e22f50si1094730585a.728.2024.08.14.10.13.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 14 Aug 2024 10:13:08 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=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=uqmmMwyH; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=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 1seHXi-0000BS-GY; Wed, 14 Aug 2024 13:12:14 -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 1seHXe-00008r-4J for qemu-devel@nongnu.org; Wed, 14 Aug 2024 13:12:10 -0400 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1seHXb-0006Cd-Nq for qemu-devel@nongnu.org; Wed, 14 Aug 2024 13:12:09 -0400 Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-201cd78c6a3so600825ad.1 for ; Wed, 14 Aug 2024 10:12:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723655525; x=1724260325; 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=CvLg/jdd02raDyPuokVKWkE8Jw8u8gKV/oNxvgJVSos=; b=uqmmMwyHcNbl6MBKnVHzZQondDQ2RUhp1dWsR1AV4bQyREX5JoyZyKXY75WM9JMBOI SnXsB/d9jpfLvLQrGCt4gfyeLhU7Uy9cekdp3kKSTMH3BqEsliRz1jxlAmlSaOZzcrmA +2o5m4AjqhmZ9iEdy5WF/bIPgVZt3dLvqp4iuXBXu3vSPXCgZNCMdlFqSVhfwZ+fY9uF Bg+Kc30DAy7y8D7qP2KTOpLkct+TuPeeO4qKsqsfeE5g8bgLc89PvETonqOqjlouxwSi oB4DmDyu6qYIshdiYzH5dRAUyjiO6UOA0XqxQC4LqiIMb9Q2xjRj84zLWF5kVPoautM7 Gd3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723655525; x=1724260325; 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=CvLg/jdd02raDyPuokVKWkE8Jw8u8gKV/oNxvgJVSos=; b=BYxP6hOY1frecKmIprnO/jyxRAZ3yFkuiWP7OPMZAKoY7o6TSP5ERYyFND6r1eW7bJ TQCMl1f7smd0NUQ+YM24BhAqBw5o60DKYL36GoUQvq/oZkVQ9foC1Xu9vE6Lrj7N8WYM xsB25hk64xd1gEJhsQzuOdgzEUyrH9Lqn4i0j1KwDL5WkoxZq6+p16AsFhb/CEkesmYN Pzat+/uS1kzhgVPissxZzT414ovDq0040GS8fcmTTD0H5jzffATTs1NcLAdg/N7DpsLQ qy3W/OBLhFRW4Aexf3NQ0M14F5Hr8vzyVY/2C5uw7hLk/AO5pajFFW9pV3eLN//OyJ0I KIkg== X-Gm-Message-State: AOJu0Yyqgf15LoF8ooMaQUF6TEaIAWxe1M6Sqs2h02rTOQV6AoN44s9p tfKSosOdggqGz9upKY4h9U3Gbp7kh8OeKpYy5wrd9hRqQjf411c3CE/CVbp8dyUYx31nwG2ydvP r4aY= X-Received: by 2002:a17:903:2449:b0:1f6:e4ab:a1f4 with SMTP id d9443c01a7336-201d638d83cmr44171455ad.12.1723655525122; Wed, 14 Aug 2024 10:12:05 -0700 (PDT) Received: from linaro.vn.shawcable.net ([2604:3d08:9384:1d00::b861]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-201cd1c8783sm31813895ad.245.2024.08.14.10.12.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Aug 2024 10:12:04 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Marcelo Tosatti , kvm@vger.kernel.org, Wainer dos Santos Moschetta , Thomas Huth , David Hildenbrand , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Ilya Leoshkevich , qemu-s390x@nongnu.org, Paolo Bonzini , =?utf-8?q?Alex_Benn=C3=A9e?= , Beraldo Leal , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Richard Henderson , =?utf-8?q?Daniel_P=2E_Ber?= =?utf-8?q?rang=C3=A9?= , Pierrick Bouvier Subject: [PATCH 1/4] meson: hide tsan related warnings Date: Wed, 14 Aug 2024 10:11:49 -0700 Message-Id: <20240814171152.575634-2-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240814171152.575634-1-pierrick.bouvier@linaro.org> References: <20240814171152.575634-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62c; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pl1-x62c.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, T_SCC_BODY_TEXT_LINE=-0.01 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org When building with gcc-12 -fsanitize=thread, gcc reports some constructions not supported with tsan. Found on debian stable. qemu/include/qemu/atomic.h:36:52: error: ‘atomic_thread_fence’ is not supported with ‘-fsanitize=thread’ [-Werror=tsan] 36 | #define smp_mb() ({ barrier(); __atomic_thread_fence(__ATOMIC_SEQ_CST); }) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --- meson.build | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index c2a050b8443..899660ef020 100644 --- a/meson.build +++ b/meson.build @@ -499,7 +499,15 @@ if get_option('tsan') prefix: '#include ') error('Cannot enable TSAN due to missing fiber annotation interface') endif - qemu_cflags = ['-fsanitize=thread'] + qemu_cflags + tsan_warn_suppress = [] + # gcc (>=11) will report constructions not supported by tsan: + # "error: ‘atomic_thread_fence’ is not supported with ‘-fsanitize=thread’" + # https://gcc.gnu.org/gcc-11/changes.html + # However, clang does not support this warning and this triggers an error. + if cc.has_argument('-Wno-tsan') + tsan_warn_suppress = ['-Wno-tsan'] + endif + qemu_cflags = ['-fsanitize=thread'] + tsan_warn_suppress + qemu_cflags qemu_ldflags = ['-fsanitize=thread'] + qemu_ldflags endif From patchwork Wed Aug 14 17:11:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 819145 Delivered-To: patch@linaro.org Received: by 2002:adf:cd01:0:b0:367:895a:4699 with SMTP id w1csp802739wrm; Wed, 14 Aug 2024 10:13:33 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUm4v5PMU+rc7ROuyaej0JNwN7NTN9IQfQoAqKfPWPqI3Va6a9nS/XA/x00zA4iXnavJ1VqV8i8qHanoaSRXEwJ X-Google-Smtp-Source: AGHT+IELxSbhewB8KYPudwX0nhPBCDk/TblVb1WF5K8+Q7A34RFD2DwDMj93SUigVkD5TdSPoF5x X-Received: by 2002:a05:6214:3188:b0:6b5:e7e5:e62d with SMTP id 6a1803df08f44-6bf5d2c379bmr31774016d6.43.1723655613707; Wed, 14 Aug 2024 10:13:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1723655613; cv=none; d=google.com; s=arc-20160816; b=FUcw5EC6XJif3ckEK2gwUisMirtM73vpNp/u0IFa2kt7L5n7ZaoeyRUmCNhNHV0A3I 7G4FRcSNuw98Bq7DduUkwduNwVEWxPtrdgLAlmhKNAIZbbQlc8JouYfdosY2PpdUgcRO 2fW6a/usI/dJvu9cRKIcllUNOdeCnTSx0eyBCj35Xk4ZzvMZxuUnolt45BBOijzDvAfm dXF1ox4mGqr9ik5DyRf5thFSwdz2Lnrx5/u1hXbPkIZT850SHWJDkTfVw+uznJ+i81Rs tPQ49EoXXDKFGOhNvDsr8KuSwxHwAdGs/alqNzXeViwIVyKT/JwV27kcgn8UMKSgpGcQ 6HsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=C8jtLk0rS0EhtRCVLy6d5dSWwHGsq2dL7mHB8O5U19E=; fh=2zasdEIMl2g9By/aYULsdPxvg2j0c442hBqLZY0SAzw=; b=dPvhErHXQd1Q5flGI4QjJKh3S4qEVQtJas0lAatq5D35db/KRVGboBawSwwHW2K8kE wiELvnW1jVJQE6zBzZcfeHd18REXsJs41KVLe2QZ8C66l50WrKRMbfPO5KiL6kwkCMUC wla10RX2qnBiB/2zLb72OtSnHn0B1gpt+EXh9I5EraOGgUpJut0VfEeIRHI4qTvzXcqo BzfXjrHKFURl8k18n32s5QAFZ9hgXbIA1fLM89aScZ9uFRrEUPQagiFqHWQe1ZWyGNNO viHICXC2uFHmn3unJWZNrUlj8QpsqB4QOFaIG7JKgzFrXAi5bcD9XcYkPTolnc0qfPF3 JGNg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zeEAHGBf; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=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 6a1803df08f44-6bd82e3529csi111682406d6.191.2024.08.14.10.13.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 14 Aug 2024 10:13:33 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=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=zeEAHGBf; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=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 1seHXm-0000IC-CU; Wed, 14 Aug 2024 13:12:18 -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 1seHXe-00008t-5X for qemu-devel@nongnu.org; Wed, 14 Aug 2024 13:12:10 -0400 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1seHXc-0006Cs-G3 for qemu-devel@nongnu.org; Wed, 14 Aug 2024 13:12:09 -0400 Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-201df0b2df4so842465ad.0 for ; Wed, 14 Aug 2024 10:12:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723655527; x=1724260327; 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=C8jtLk0rS0EhtRCVLy6d5dSWwHGsq2dL7mHB8O5U19E=; b=zeEAHGBfCSAbIixCoDRrJ7O5y1lLmtbcYGX1IAVBts9a8oRVsT31WsJruJEFCfNxAx 6vdSys4VMT+VIDA7pcgGg7QrVW0epM2TiY/7/a+DxxY+tQ71ltfmNtPA+HnxA2Wa1pve yYQ6h5/5HOnzCfTflKyZW9dQoT/c9stUNZRRZF1xWx0th3C5BydB76abI/UUXpC2SOt9 1j49xFDxp8WqVXIqQtJtvW863n81Ls5LQ92+sEy47t7P6H5Z9xGDPbgPQcd5bBMc94lb aE+s9E/IDK8/LiFcEEZmpZgWlVf92IIQKaUGjvs+tq2ECO6lbOm2QNauw604Tch7RaZi 2Hpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723655527; x=1724260327; 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=C8jtLk0rS0EhtRCVLy6d5dSWwHGsq2dL7mHB8O5U19E=; b=gnT/eswOSpFiVbvVoZrWOhv+IQPqs7dCfWH3r4hyROOTtj1G0PKGnrh11js4UDufdL wDyW2dayulfl2UnLjIhzeGNpp6jlWvN8fPPiw3vBnWyCD+c/EdDyVkkek1KO9TiAInt4 q5DDc4/JMpXQHniyfBRsylPdP6QgvULRG5hrY0z6kPI4GoLGjIakZW/+ecCSsD2BKB2G ye0FlmX9sZ+aNRpHQHcmDPyYFsiGau+jOdbOcN2KvPkfPzdDePo+sMgaARZUk088dZrW XA3G+KVICt0/2nDMRbCFeWKJfKLp5a8/2D949Bqh5YNWJ4mJWWehYJPx/xochm69U4Gp iT8A== X-Gm-Message-State: AOJu0Yygqh/+ApSc3nj67yqGG5byV2Od3vvmwAjNngHcJyTVXMsDsQG+ jhSOjrbvKhYuq6DPL3zdgqww+821gBj1TtEBS4QY9+Ozv6ceoHNIXQpBpzT3Oe2KiAX/Qwn2uqJ HvBs= X-Received: by 2002:a17:902:b68b:b0:201:cdfb:2919 with SMTP id d9443c01a7336-201d638d821mr32538115ad.8.1723655526725; Wed, 14 Aug 2024 10:12:06 -0700 (PDT) Received: from linaro.vn.shawcable.net ([2604:3d08:9384:1d00::b861]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-201cd1c8783sm31813895ad.245.2024.08.14.10.12.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Aug 2024 10:12:06 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Marcelo Tosatti , kvm@vger.kernel.org, Wainer dos Santos Moschetta , Thomas Huth , David Hildenbrand , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Ilya Leoshkevich , qemu-s390x@nongnu.org, Paolo Bonzini , =?utf-8?q?Alex_Benn=C3=A9e?= , Beraldo Leal , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Richard Henderson , =?utf-8?q?Daniel_P=2E_Ber?= =?utf-8?q?rang=C3=A9?= , Pierrick Bouvier Subject: [PATCH 2/4] target/i386: fix build warning (gcc-12 -fsanitize=thread) Date: Wed, 14 Aug 2024 10:11:50 -0700 Message-Id: <20240814171152.575634-3-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240814171152.575634-1-pierrick.bouvier@linaro.org> References: <20240814171152.575634-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62c; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pl1-x62c.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Found on debian stable. ../target/i386/kvm/kvm.c: In function ‘kvm_handle_rdmsr’: ../target/i386/kvm/kvm.c:5345:1: error: control reaches end of non-void function [-Werror=return-type] 5345 | } | ^ ../target/i386/kvm/kvm.c: In function ‘kvm_handle_wrmsr’: ../target/i386/kvm/kvm.c:5364:1: error: control reaches end of non-void function [-Werror=return-type] 5364 | } --- target/i386/kvm/kvm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c index 31f149c9902..ddec27edd5b 100644 --- a/target/i386/kvm/kvm.c +++ b/target/i386/kvm/kvm.c @@ -5770,7 +5770,7 @@ static int kvm_handle_rdmsr(X86CPU *cpu, struct kvm_run *run) } } - assert(false); + g_assert_not_reached(); } static int kvm_handle_wrmsr(X86CPU *cpu, struct kvm_run *run) @@ -5789,7 +5789,7 @@ static int kvm_handle_wrmsr(X86CPU *cpu, struct kvm_run *run) } } - assert(false); + g_assert_not_reached(); } static bool has_sgx_provisioning; From patchwork Wed Aug 14 17:11:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 819146 Delivered-To: patch@linaro.org Received: by 2002:adf:cd01:0:b0:367:895a:4699 with SMTP id w1csp802757wrm; Wed, 14 Aug 2024 10:13:37 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXc0dHWwtLPZtjfrhTPwpTL7XOjDh6PMABKGvbe4VxFRJngrgXSfO+/orT9e9Piu+h+y4ZIvgP3SNHPVyeM/ymq X-Google-Smtp-Source: AGHT+IEm7dT0SSQz1DmWL20nHpNycsqZy1ppC8HwqzSEHfDPfFiS/Njk4ztT4JnCYO92sdJLZo3B X-Received: by 2002:a05:622a:4d97:b0:447:f89a:4d41 with SMTP id d75a77b69052e-4535bb064edmr42517821cf.30.1723655617093; Wed, 14 Aug 2024 10:13:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1723655617; cv=none; d=google.com; s=arc-20160816; b=sBI/R/HDywmK79hsg6xoC9duXjE4SQGFhde7m+0tDFWfOJJTs4qrR5RomWlxKoZRQH P3bNhAg25vg988aqjhOp7q7Qa8gIyzFTD5zNKo6TZZ7Zz1UaOZOZSX9fNjE9p61xyCg2 fpaK4eDvC0Xy5ZWgB8WT/qf16VbEv84vAI801GKFzYnkjvyQciOqbiz5Zi+KZ/nRNHt0 t3HNAN/+1CXHj8vxSG8rlBMB6LIG7VvpIZLj8szj5ILw/ziR+L9ohBALKAOfehd7kuGN 8hcgReaVqOr6zQQ7/An4FBad2c0UU1J024p9/bcT1DlGz5TKj51tiOryKSB+NFxh1G8z IBVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=d7PkrlYQr/V3YMS3es97SiZgcfp3AW/tKZmcfuYfGEw=; fh=2zasdEIMl2g9By/aYULsdPxvg2j0c442hBqLZY0SAzw=; b=mh2k6BIZsD5iK/PT48TRoOOMk1kObWMXu5IXpuUYnoh5sq0p0kDbm1Rbl5kE/CPfqN ehA3+R05g19uVvj7/+J+8rUx7bfPirs2uLDARTdIDKwnPQHEpfrgib80kbbHKxxvYeC5 2WGK/U+hL7f0pzzpJRNr6kDHkX0tWOmzMHc/Dcxdwmgqg6z1OZTrb7uSFBgDoZKhx8RV vkAVAzoa+BOpGYlrH1ayuhyBHcZEbNW7IqxSkWpehLyH7c//H8LnW/OX0gkbb0fVbVBv rGpnzREbEbAQAskrACwiTWDL64En8Pw6fTKUUmaMgD315qvz3cGDzSWIz5NuYIbJ97YU 8z0A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kf7g1y9E; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=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 d75a77b69052e-4531c265847si111485611cf.253.2024.08.14.10.13.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 14 Aug 2024 10:13:37 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=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=kf7g1y9E; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=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 1seHXm-0000IM-BA; Wed, 14 Aug 2024 13:12:18 -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 1seHXf-0000AU-D8 for qemu-devel@nongnu.org; Wed, 14 Aug 2024 13:12:12 -0400 Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1seHXd-0006D2-69 for qemu-devel@nongnu.org; Wed, 14 Aug 2024 13:12:11 -0400 Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-1fec34f94abso637775ad.2 for ; Wed, 14 Aug 2024 10:12:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723655528; x=1724260328; 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=d7PkrlYQr/V3YMS3es97SiZgcfp3AW/tKZmcfuYfGEw=; b=kf7g1y9Ey8R97LoppDxkenw136vJQ4PhuZrSQOsEKGkYQj5wBrPMvKNGB536gHMWqY NHJ8qtXb48V+XIXQy2ZdpUpaY++PE7SmA84bfBgMJmw9KzZMIP0MGxz6BRSglKlswvw+ 3aD5R0PpfJNAOc0KbIBY679SZDL+N+iwXX6NHFPiDjgx9Wy7AJM2EpjtOolpIRy9gxcO pld36CtomUNrTt/2+tc7YHEnSleQuK7MQB5jaaCPn24JDjwDiOMQfjlHt5A8YiALnmCp jCh4EyAHVKRVPs1tm/AhCZvU5ZR2OiBjPUDYqDW85AA4mRVLCRLBrMZc4sxgmX+Bj5TM L8cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723655528; x=1724260328; 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=d7PkrlYQr/V3YMS3es97SiZgcfp3AW/tKZmcfuYfGEw=; b=PH1ltmBGUiyi/YZqTazVTkmXlXiVcCh76kO34Rx5ACAp2GMaBSrDBdoRcyNCWm15B4 Lg8l8OpMqkH8c+M0U9JDx1JN8SZCCeySGgj662Jkpnx44E0oGSXLUCuWzQ//mxN/3RqR ug3Lw03GY4xcW0pZviD9ibFP622MCXqkfSqMGELcNATeuApIFX0ojC7ATBwctK98WlFw 2BQKc6Ep9XeamdtPBvcirPwN3Uak+xFaie1CaF8GRHHZynTyJoYbRFxit9fWB8IYsGpk T2CRRdoQ4Y/OtlONiTAyVPmIC40mES4fKc/7uTEFCXZ06MJ3dwl9ebit7Z+br98v7cS2 OSDg== X-Gm-Message-State: AOJu0Yz3Bj2UevzxCu9tEBWUhYDgFNeP54KRuZh+/qY7Y/Z2hJ4GRowy Ozqe5HbUDpOAVx45sKIrBZExyhHiMHJMgOvqeH4Kd8bRtW5bIl1I21Wie1pkq7n5y6vIbTQgOIv vHsQ= X-Received: by 2002:a17:902:d2c4:b0:1fb:7b96:8467 with SMTP id d9443c01a7336-201d651f85emr34242465ad.63.1723655527854; Wed, 14 Aug 2024 10:12:07 -0700 (PDT) Received: from linaro.vn.shawcable.net ([2604:3d08:9384:1d00::b861]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-201cd1c8783sm31813895ad.245.2024.08.14.10.12.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Aug 2024 10:12:07 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Marcelo Tosatti , kvm@vger.kernel.org, Wainer dos Santos Moschetta , Thomas Huth , David Hildenbrand , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Ilya Leoshkevich , qemu-s390x@nongnu.org, Paolo Bonzini , =?utf-8?q?Alex_Benn=C3=A9e?= , Beraldo Leal , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Richard Henderson , =?utf-8?q?Daniel_P=2E_Ber?= =?utf-8?q?rang=C3=A9?= , Pierrick Bouvier Subject: [PATCH 3/4] target/s390x: fix build warning (gcc-12 -fsanitize=thread) Date: Wed, 14 Aug 2024 10:11:51 -0700 Message-Id: <20240814171152.575634-4-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240814171152.575634-1-pierrick.bouvier@linaro.org> References: <20240814171152.575634-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::62d; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pl1-x62d.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Found on debian stable. ../target/s390x/tcg/translate.c: In function ‘get_mem_index’: ../target/s390x/tcg/translate.c:398:1: error: control reaches end of non-void function [-Werror=return-type] 398 | } --- target/s390x/tcg/translate.c | 1 - 1 file changed, 1 deletion(-) diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c index c81e035dea4..bcfff40b255 100644 --- a/target/s390x/tcg/translate.c +++ b/target/s390x/tcg/translate.c @@ -392,7 +392,6 @@ static int get_mem_index(DisasContext *s) return MMU_HOME_IDX; default: g_assert_not_reached(); - break; } #endif } From patchwork Wed Aug 14 17:11:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 819144 Delivered-To: patch@linaro.org Received: by 2002:adf:cd01:0:b0:367:895a:4699 with SMTP id w1csp802738wrm; Wed, 14 Aug 2024 10:13:33 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVMux26yPrip2nhdlj4uqN/1gzocYLbJzYrIYwVGYMtgy3ivAUpiiA+NfTG2+4xERVfVdl+xae4/k5ezLgviNSo X-Google-Smtp-Source: AGHT+IGboAYUbLF9hkMfw6z2bouM390vk63sM31ZUGkyWcHQQQQ1X7/t+Nlq27UxRqFX2unYSPhg X-Received: by 2002:a05:620a:424f:b0:7a1:dfd0:80c9 with SMTP id af79cd13be357-7a4ee330d05mr442288385a.27.1723655613640; Wed, 14 Aug 2024 10:13:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1723655613; cv=none; d=google.com; s=arc-20160816; b=kv/wQJqnLxFNfN/hbx/So/8b0snuhbnn9Da2EhlChzMHORXWw+e5QrGS+YMsnKgAPV pxXL3nSUnVXP8CtST9KQqmsD/B0hNr4S9QnyMiXx4Zj0faNBtoAjed2oN/DFdIh1GuMT nexBnmvrFoN6FvIfQvioFCFBQX/kHcEXqWalItj0wdTlhJQcPMC21Qo2IYS87koHEkGM kXGfpEYmHikT83SdezRd2CZ8+7FUCR+IiLZWOBQVczEIgpO6+YVgPLkBcQurzMigc9Pl EV/bflUAWnxIiyBpjIw5EJnvLVqQ0jhTLVmx8O9ORr54Uo31rrivKdZW47DNglKaursV zDiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=cUn79WU14zqlH0c8ZH40FfQUSvZAWtp5MDwWi4t6xwQ=; fh=2zasdEIMl2g9By/aYULsdPxvg2j0c442hBqLZY0SAzw=; b=jXKfxnfNEQMa/3Wm4EWyeRAK6qcs4F2Ffj+omZseYpK7uacQGPIwbl80E7sdXeJXMK nGlJ66+iQhE5bweXdj2uacp4DPCdC1Lnrly9NSpNvZETc6P+i90pa49Mw7nbbyAkkpp+ OKdtkioAqJvzNXefGhwLjeCBsOp7/fCMifk0O8cY5Om0j34irsbX0NxfP6Q+ja4yDVtD ECG10Lk9/5wvbZHxIGprcUMLbep6aDquxgubce/BMU6dRHCxUVIQUtq5tnDH7d9fRtQK 0dr6j2O0pfRpo7TUINohj9YtxCGqAbhU2KcQySdnBCbhN1qwi0XjdmvdUpc+46naJtYq SQEQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JmphD9tM; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=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-7a4c7d66195si1100139085a.91.2024.08.14.10.13.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 14 Aug 2024 10:13:33 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=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=JmphD9tM; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=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 1seHXm-0000Pe-GO; Wed, 14 Aug 2024 13:12:18 -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 1seHXg-0000BP-Qs for qemu-devel@nongnu.org; Wed, 14 Aug 2024 13:12:14 -0400 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1seHXe-0006DL-CI for qemu-devel@nongnu.org; Wed, 14 Aug 2024 13:12:12 -0400 Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-201d6ac1426so646545ad.1 for ; Wed, 14 Aug 2024 10:12:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723655529; x=1724260329; 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=cUn79WU14zqlH0c8ZH40FfQUSvZAWtp5MDwWi4t6xwQ=; b=JmphD9tMByaiGwa4V/M0iw0DqnZtFtQr1qGtn8E/v7q/7BFiGheQKVwirWqz82DW6H sFbl2ivpjGLLiiseWjDklVHJ9ofD+DpXtyK0TGNZXfJATtdugo7i+sqTajoNlJJ6QBGK HwBbZNoHdUzLc6DBdFWeq+FV6p6FiU4HDM08Zq4GL9jhvMRWhKRpgJqblazeb8oJi0w1 k1jo6r9PqakI9qcYCfFkwiCcL/fr/ZemnaPZQONAO26kjYMJxSI1VYa85tcYc6/tqrKc JBLHoMu9e5tBWkhWLAgKMZFFBpRLhINBEVOmlOc9MxJrHfZ1yxRTH3iOvNmDwphGBn8M iHFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723655529; x=1724260329; 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=cUn79WU14zqlH0c8ZH40FfQUSvZAWtp5MDwWi4t6xwQ=; b=Q6nQbZ5uGKJOM3JbRoWXCMRl1Tny+TH9rmxBHKElVNZB8aK1BBcuLfQsAOiXo+L6ZV bXB3Ggb4dEDf54EGiMQgVac05DNgW+nKHFbwtZ/IScP76qEmOSwjLn0dXF1tTNrdlNYd wzdeacxx8Eangj26anAn0YuEoXAfJYZL58ttDDjkzKltP4KGusRmLT7EMwNfWwK/FibF BTuW/YMdyM4rIvGY9UwoXjIFB/JVf/mWewlnZ4gwVSZJPRhzV3DDZW9Nnxt3heQ1KyDl uQTtko4K3fCNK/eB1kvE0mUSgGGolTfPwgVOFnRA1KYw6SQACKm6qXXpQsRH8v6DxH7r VtpQ== X-Gm-Message-State: AOJu0YzaevXKnpmA8xWL+20ZPLzoEuoPE4KW2rS/ugXvfSjtmRpoVBV+ U4kliRMh6FiYKFh+Ut3VC2fm0gZHy28qnJH482+E6LfM73Del0B0a5wwhiya4UGc7gbyB+randj YT0s= X-Received: by 2002:a17:903:11c8:b0:1ff:49c:1562 with SMTP id d9443c01a7336-201d64d8afcmr37992915ad.56.1723655528927; Wed, 14 Aug 2024 10:12:08 -0700 (PDT) Received: from linaro.vn.shawcable.net ([2604:3d08:9384:1d00::b861]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-201cd1c8783sm31813895ad.245.2024.08.14.10.12.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Aug 2024 10:12:08 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Marcelo Tosatti , kvm@vger.kernel.org, Wainer dos Santos Moschetta , Thomas Huth , David Hildenbrand , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Ilya Leoshkevich , qemu-s390x@nongnu.org, Paolo Bonzini , =?utf-8?q?Alex_Benn=C3=A9e?= , Beraldo Leal , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Richard Henderson , =?utf-8?q?Daniel_P=2E_Ber?= =?utf-8?q?rang=C3=A9?= , Pierrick Bouvier Subject: [PATCH 4/4] docs/devel: update tsan build documentation Date: Wed, 14 Aug 2024 10:11:52 -0700 Message-Id: <20240814171152.575634-5-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240814171152.575634-1-pierrick.bouvier@linaro.org> References: <20240814171152.575634-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::629; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pl1-x629.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Mention it's now possible to build with gcc, instead of clang, and explain how to build a sanitized glib version. --- docs/devel/testing.rst | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst index af73d3d64fb..f10cfc3f786 100644 --- a/docs/devel/testing.rst +++ b/docs/devel/testing.rst @@ -634,20 +634,38 @@ Building and Testing with TSan It is possible to build and test with TSan, with a few additional steps. These steps are normally done automatically in the docker. -There is a one time patch needed in clang-9 or clang-10 at this time: +TSan is supported for clang and gcc. +One particularity of sanitizers is that all the code, including shared objects +dependencies, should be built with it. +In the case of TSan, any synchronization primitive from glib (GMutex for +instance) will not be recognized, and will lead to false positives. + +To build a tsan version of glib: .. code:: - sed -i 's/^const/static const/g' \ - /usr/lib/llvm-10/lib/clang/10.0.0/include/sanitizer/tsan_interface.h + $ git clone --depth=1 --branch=2.81.0 https://github.com/GNOME/glib.git + $ cd glib + $ CFLAGS="-O2 -g -fsanitize=thread" meson build + $ ninja -C build To configure the build for TSan: .. code:: - ../configure --enable-tsan --cc=clang-10 --cxx=clang++-10 \ + ../configure --enable-tsan \ --disable-werror --extra-cflags="-O0" +When executing qemu, don't forget to point to tsan glib: + +.. code:: + + $ glib_dir=/path/to/glib + $ export LD_LIBRARY_PATH=$glib_dir/build/gio:$glib_dir/build/glib:$glib_dir/build/gmodule:$glib_dir/build/gobject:$glib_dir/build/gthread + # check correct version is used + $ ldd build/qemu-x86_64 | grep glib + $ qemu-system-x86_64 ... + The runtime behavior of TSAN is controlled by the TSAN_OPTIONS environment variable.