From nobody Mon Nov 25 07:51:42 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1716529060; cv=none; d=zohomail.com; s=zohoarc; b=ZeVX9UWz6G2MFPZUAT6seIFySEKVKfc82JZ/ekPtalfe5xC25iQ97pQCuEruLcImkuBEITh5u7UpwdMwu4UarDfAjR6fa8ejjWz9ddoyMZT4XFLAKkObod8QmJYCmmBGhqpaJV/HyYs2MB+bSgc2/xe3WDx03BXQQovBXwzEjUI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1716529060; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ktjQT4R7pKWFtbxj3xSZ2/NJzr1LvAGm2r7cio2ONHQ=; b=m7GRJPf52IRzD/eON3RgA+naBPnU7XyY7vh3Ius1dwQUHa2YdUi+vn7OhN0phAqgDn3/LB3vduBQvEYaqkCaACzAM/gy9aMeaushm1N6yw58VVGlP+fdDIY6d/0YN6k0uZ7diNA9BVEu21Cs5E1LQZ++pMmSbm/BpU3+XoVSlKM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1716529060323668.2974793543265; Thu, 23 May 2024 22:37:40 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sANbK-00089t-Q7; Fri, 24 May 2024 01:36:22 -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 1sANbI-00089b-O9 for qemu-devel@nongnu.org; Fri, 24 May 2024 01:36:20 -0400 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sANbH-00013w-6O for qemu-devel@nongnu.org; Fri, 24 May 2024 01:36:20 -0400 Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-1f44b45d6abso4001515ad.0 for ; Thu, 23 May 2024 22:36:18 -0700 (PDT) Received: from localhost ([157.82.204.135]) by smtp.gmail.com with UTF8SMTPSA id d9443c01a7336-1f44c75697bsm5260235ad.34.2024.05.23.22.36.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 23 May 2024 22:36:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20230601.gappssmtp.com; s=20230601; t=1716528978; x=1717133778; darn=nongnu.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=ktjQT4R7pKWFtbxj3xSZ2/NJzr1LvAGm2r7cio2ONHQ=; b=rlJKdLW2cU2UfE6g76HOCF8HkidZSG2rfVmvQ8uTgNXi4k8tq+jekuouxVreyoWE7/ lkldnr9wOhH10VnztlLWbCR7b8NFhNPOmPpmw0R1NYH8pa0gkmsxMVerHE0AF+Ty5Bdi xVvEPusiTT4NlCiHxye//uZl9w5AYz7cYStk2KHGtsGVs8A3AXza0OwK52Tp4Z7W3hpk 2Q6pKH0j4Th5TJLUH0u12CInw3OA+BZ4jVRuT6SaZInHSrDYBhjq+rYr2RUhhe5ChVws ElgVuDNzU5041miSKX2cE9pIS7nX6eE92Nk+jifiQaYvhjjRbKSFXJtMBWQM3ly80PBG Ddow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716528978; x=1717133778; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ktjQT4R7pKWFtbxj3xSZ2/NJzr1LvAGm2r7cio2ONHQ=; b=turtUu1J6v7MemSdg80W05/s6zhXm4GsgrNgsqxodkzMA+lWGKeOHds1IfU8M7ilfl MDIfCRso/7Qt7w1g48JeERtkTCW+rK3ng4j8XrbF/bYKH41YuwVnwG7I8u7TAx9wbW3t ir2ltNgYB3T7KxiJEVOdrpabgQ/9peBMQQN4lR331E76khCpLq9rOinuD2NJZkNwDQWB qAWILnrzbbQkq3/8Wd5LGdHfbT5o3OocO9Q3A286WpfrrpJNnQ1PMZUqCHCB1PJSErK2 jPh2BMx32r9Nt+bvPYi8SJN0l2fJqwhiDYZB68WB/d4XZSQASSQtoLPkVeNd97QbQoVJ NrJg== X-Gm-Message-State: AOJu0YwEBlx9Uqg/VCpdrXpA+3sP3kT/wxYW4QPv8gMCUfrv8d1Zwy/Y 8YVl2PAf/iaQQpD89aaBcgywLOi3IBte7sdBOL3EIz2IHIWcZOY7ziaaXM6+8xw= X-Google-Smtp-Source: AGHT+IEFZ+jesRSDpf/pppvd2SVpWqc0Szr2Uz9/jVsqRlDjjtNUrDEY0kJClmvpyIRc2rOKUG4/Kg== X-Received: by 2002:a17:903:41ce:b0:1f4:5477:4bfe with SMTP id d9443c01a7336-1f454774e3cmr2458085ad.69.1716528977932; Thu, 23 May 2024 22:36:17 -0700 (PDT) From: Akihiko Odaki Date: Fri, 24 May 2024 14:35:47 +0900 Subject: [PATCH v4 1/4] qemu-keymap: Make references to allocations static MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20240524-xkb-v4-1-2de564e5c859@daynix.com> References: <20240524-xkb-v4-0-2de564e5c859@daynix.com> In-Reply-To: <20240524-xkb-v4-0-2de564e5c859@daynix.com> To: Michael Tokarev , Laurent Vivier , Paolo Bonzini , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= , Wainer dos Santos Moschetta , Beraldo Leal , Richard Henderson , Laurent Vivier Cc: qemu-devel@nongnu.org, Akihiko Odaki X-Mailer: b4 0.14-dev-01a33 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: none client-ip=2607:f8b0:4864:20::632; envelope-from=akihiko.odaki@daynix.com; helo=mail-pl1-x632.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @daynix-com.20230601.gappssmtp.com) X-ZM-MESSAGEID: 1716529062025100001 LeakSanitizer complains about allocations whose references are held only by automatic variables. It is possible to free them to suppress the complaints, but it is a chore to make sure they are freed in all exit paths so make them static instead. Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- qemu-keymap.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/qemu-keymap.c b/qemu-keymap.c index 8c80f7a4ed65..701e4332af87 100644 --- a/qemu-keymap.c +++ b/qemu-keymap.c @@ -154,9 +154,9 @@ static xkb_mod_mask_t get_mod(struct xkb_keymap *map, c= onst char *name) =20 int main(int argc, char *argv[]) { - struct xkb_context *ctx; - struct xkb_keymap *map; - struct xkb_state *state; + static struct xkb_context *ctx; + static struct xkb_keymap *map; + static struct xkb_state *state; xkb_mod_index_t mod, mods; int rc; =20 @@ -234,8 +234,6 @@ int main(int argc, char *argv[]) =20 state =3D xkb_state_new(map); xkb_keymap_key_for_each(map, walk_map, state); - xkb_state_unref(state); - state =3D NULL; =20 /* add quirks */ fprintf(outfile, --=20 2.45.1 From nobody Mon Nov 25 07:51:42 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1716529065; cv=none; d=zohomail.com; s=zohoarc; b=DRFnDNws1fvwuNHwMO20GgZcR2PusSMzWcNCvT9aWHQEV3CPktOkybuUZ65cC+SX1XFhq4rTZvNgwNGBQHd179DHcltfHxJMZlW+VstqWkiz+Jr0e+6IoFKrMfPdb7k1mqnYC7Wlam2CXYBO+Es5olA87ZlJUqDulaLPRBPGjbc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1716529065; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=CxG2P76G/OTNBVGMvRYEe0TWmwUTzdWD9903oTGfTEk=; b=DD/DZ3oCIjM5eybaQdiADuGKXE7JHuRIDUljNjiBWJLUylY3mZpka2P32nmlkaLWn0YSIydb69PzuK0iQGc2jhYkoDtfiqFRJBWNqgsxLlXgQR3sTd8K6nig9iFhAZn6BJ+aMjBeelqalIXegxC4Eu6dRKc68atgsGwhBBiv1zE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1716529065779397.85478655730367; Thu, 23 May 2024 22:37:45 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sANbQ-0008Bj-EH; Fri, 24 May 2024 01:36:28 -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 1sANbO-0008BH-FA for qemu-devel@nongnu.org; Fri, 24 May 2024 01:36:26 -0400 Received: from mail-oo1-xc31.google.com ([2607:f8b0:4864:20::c31]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sANbM-00014N-PK for qemu-devel@nongnu.org; Fri, 24 May 2024 01:36:26 -0400 Received: by mail-oo1-xc31.google.com with SMTP id 006d021491bc7-5b3241373adso4518698eaf.2 for ; Thu, 23 May 2024 22:36:23 -0700 (PDT) Received: from localhost ([157.82.204.135]) by smtp.gmail.com with UTF8SMTPSA id 41be03b00d2f7-682274bbd96sm427042a12.87.2024.05.23.22.36.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 23 May 2024 22:36:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20230601.gappssmtp.com; s=20230601; t=1716528983; x=1717133783; darn=nongnu.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=CxG2P76G/OTNBVGMvRYEe0TWmwUTzdWD9903oTGfTEk=; b=W+FCOAoFxxhMUFcfboQG62XZcBAcTe0Fkldy2VZSatsziKj2oVcGjOWbcdwoJ/t39j 4mIg7bcNGVwRLRUx1upToSciJSWIFzOEDz4AyMmCtiVpa0YIswZ0GC9YFJkpsj2Ynbc7 OF/54caG10Hq0OhLg/PCHbHHQFiWCX9HCVdWEtp2ai0b+1o0uUTavOPk2zdSq+9w4mJd 9BkSTsJPsqiBcBhvyzvRaATL7HDUZ+rytQKX6DmxfBTDTBKaO9skEvfJ/qGesepmJqBZ OOVnUjolfRS6w4UvuONhzLm07hnkltUPOjWz38zcctEaezzmLvBuVroLK0eKgxPdEhcj 8mLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716528983; x=1717133783; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CxG2P76G/OTNBVGMvRYEe0TWmwUTzdWD9903oTGfTEk=; b=t7PkyznetgexpKAu2qFWFBeuUFWAnC4AmA+m76h76BsT+jy0WPl+vxGXaci+JVdldV gm/aJ8ii4uIR6hKka3eNWCj+4uvuPAlmkWZgHDNLGGWI+FZ4ggNeJHrYPdA5dOjOW27l XDlK35HHZXO3uOQGKfCtNRfNrLNxRGOCVL3hq69IVbjJTSru+uOXrybAOxSactTjV4pl LVHlZQ9rXUvVdQ67vLOheYOSj4BlnSM+8ArUl/61zH5h43ov9tNyna+bDQdc1/X+Z8n5 RyX1y+6scYmDzqJBR8EAWvegf1hlk+ZXyO68Hjec2QU0ZjqYkZe0Pv4tor7PqzOc2GuQ atfA== X-Gm-Message-State: AOJu0Yw3eQWji5SrMoAoF0b4CGtxrPukVzbz4B3NVlWcOPqP/zV8aIy3 iQojjThO+9CvrBrmG7jlciGmKt+myRvkmSrrJ0OkCEGuBD0rz4S2Iiza/Drd8S8= X-Google-Smtp-Source: AGHT+IFsw4QyiPf3QWmoQjeuyrwFeeTtZc8mctLSqR0Z0OD+5fjSM0qBmgC05URQNg012oPnQNcaBQ== X-Received: by 2002:a05:6359:4c12:b0:189:9aa2:c25d with SMTP id e5c5f4694b2df-197e565ff65mr179330355d.20.1716528982658; Thu, 23 May 2024 22:36:22 -0700 (PDT) From: Akihiko Odaki Date: Fri, 24 May 2024 14:35:48 +0900 Subject: [PATCH v4 2/4] lockable: Do not cast function pointers MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20240524-xkb-v4-2-2de564e5c859@daynix.com> References: <20240524-xkb-v4-0-2de564e5c859@daynix.com> In-Reply-To: <20240524-xkb-v4-0-2de564e5c859@daynix.com> To: Michael Tokarev , Laurent Vivier , Paolo Bonzini , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= , Wainer dos Santos Moschetta , Beraldo Leal , Richard Henderson , Laurent Vivier Cc: qemu-devel@nongnu.org, Akihiko Odaki X-Mailer: b4 0.14-dev-01a33 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: none client-ip=2607:f8b0:4864:20::c31; envelope-from=akihiko.odaki@daynix.com; helo=mail-oo1-xc31.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @daynix-com.20230601.gappssmtp.com) X-ZM-MESSAGEID: 1716529067304100003 -fsanitize=3Dundefined complains if function pointers are casted. It also prevents enabling teh strict mode of CFI which is currently disabled with -fsanitize-cfi-icall-generalize-pointers. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2345 Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- include/qemu/lockable.h | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/include/qemu/lockable.h b/include/qemu/lockable.h index 9823220446d9..c1b097c44879 100644 --- a/include/qemu/lockable.h +++ b/include/qemu/lockable.h @@ -43,15 +43,30 @@ qemu_null_lockable(void *x) return NULL; } =20 +#define QML_FUNC_(name) \ + static inline void qemu_lockable_ ## name ## _lock(void *x) \ + { \ + qemu_ ## name ## _lock(x); \ + } \ + static inline void qemu_lockable_ ## name ## _unlock(void *x) \ + { \ + qemu_ ## name ## _unlock(x); \ + } + +QML_FUNC_(mutex) +QML_FUNC_(rec_mutex) +QML_FUNC_(co_mutex) +QML_FUNC_(spin) + /* * In C, compound literals have the lifetime of an automatic variable. * In C++ it would be different, but then C++ wouldn't need QemuLockable * either... */ -#define QML_OBJ_(x, name) (&(QemuLockable) { \ - .object =3D (x), \ - .lock =3D (QemuLockUnlockFunc *) qemu_ ## name ## _lock, \ - .unlock =3D (QemuLockUnlockFunc *) qemu_ ## name ## _unlock \ +#define QML_OBJ_(x, name) (&(QemuLockable) { \ + .object =3D (x), \ + .lock =3D qemu_lockable_ ## name ## _lock, \ + .unlock =3D qemu_lockable_ ## name ## _unlock \ }) =20 /** --=20 2.45.1 From nobody Mon Nov 25 07:51:42 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1716529074; cv=none; d=zohomail.com; s=zohoarc; b=n8qYjtGj8CA5liGwmqL5cJod9xnZ9Rm75ofbV6YC8gmnJAFI5JubNwqHDlY1x/Jxs0ZP3iAggvf1zhTQCGUi1gyd/Wpc7JPRM08pGFCY7dR0aHHyfgOC/GvHZwXNSmCUxN8flOKk8/n2TX7R3153iS0Ju6pX5org09xf4w+wNH0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1716529074; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=AfvWh15VwJ7bsi1zE22Wn8t3fv0MNqUE1xgb1xRqaAQ=; b=jbHSqDJ2C3uLb2pr9Y9DMfMbsTrY0sTxL+0BHa+kgw6oUXKOgKMjOSPPs9HClvklett9kUHahYbxe8KC4+61XZLksEYXXCP11QmVIrUSfApBDgOpAwFGujQxJ8j40NIgm/W40DgJxrd6tnWaC4gZyMs/NuN6bO7YXnnTukcfqvQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1716529074678270.97050482043176; Thu, 23 May 2024 22:37:54 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sANbV-0008Cz-KT; Fri, 24 May 2024 01:36:33 -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 1sANbS-0008CG-TA for qemu-devel@nongnu.org; Fri, 24 May 2024 01:36:30 -0400 Received: from mail-pf1-x434.google.com ([2607:f8b0:4864:20::434]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sANbQ-00015A-Ne for qemu-devel@nongnu.org; Fri, 24 May 2024 01:36:30 -0400 Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-6f8ea3e9543so449059b3a.2 for ; Thu, 23 May 2024 22:36:28 -0700 (PDT) Received: from localhost ([157.82.204.135]) by smtp.gmail.com with UTF8SMTPSA id d2e1a72fcca58-6f8fd4d58easm457201b3a.198.2024.05.23.22.36.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 23 May 2024 22:36:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20230601.gappssmtp.com; s=20230601; t=1716528987; x=1717133787; darn=nongnu.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=AfvWh15VwJ7bsi1zE22Wn8t3fv0MNqUE1xgb1xRqaAQ=; b=mHfKrR1cXZMm2ZZ3ds1WlsFsSYyg0w1Pjv3uzXH45J0EN75t9ReqsmTy6PfyO5S2sC 4h9zWltjnc/SDcLWqNN7EaWqW2aLxN2HLK2Wd0eVGjK4VhrmRyEKOw8zHxmbNCnF7u0x RJVFHu+Mpa8BrJCLQK1h9qMIkoc82BXH1nhnlLmA3CENeh4HB3XZirdWLOfp08cKOyT5 kWn3MnNwOerQT8obMgUU21t18ooUyb2m8dzVIBl6K9jTkzI72W3on2J1qjNYiM6xQw0P oNrXxAA2eI8sIBTFfiJ1ABKbiuOytDxRXjUd6DIiy2xTyc8lRycZKTrvoWYJUyfY1wgQ 5gQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716528987; x=1717133787; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AfvWh15VwJ7bsi1zE22Wn8t3fv0MNqUE1xgb1xRqaAQ=; b=inn1bmMEWFdSAtLq0a8kELn2MCEhQi3WRUQDhfGQyuUfeIV0EXlXrFRC+lNsQS/Jkr ikBcTc1LRtNfDxn7MVo5FBnolVlWLUdgp6VZR5LuAbGCLGkUWH0iKbep9H8T1DzZCeHR lytQA8zvtHg9JIJEbZyEC8fRQaYvcitBc4/ap4fuUwJlgR5T50uFC7sLUfSmPogxdLhW fUme4CXwm+auMlq5uSV15BIrzqyPfke52L62gNBVFj5aDPjBzSFTQw+Abr6hJHYcUDxV BshePkcta1Yz0Zct7yZM74p6Iug4fkKVAuPYK4I90YTnogfEde9LmQzyJumZNGUDzAAF hHAQ== X-Gm-Message-State: AOJu0YwDJrjUrel7EPQDSssQ3vaAAmLFRwQM2sCq7a30HKWKQGgVtwJY jdpNvPsktU939NZJkIGCMXK+7hWATvQiVcD7jMN0A7A7mVHHF8xbFNKWnEcs++w= X-Google-Smtp-Source: AGHT+IFG3fAGmsAARtFqlWWNC2/jCc7tD//SUhB73tK0XCnUrtlh0XI/XihPvDzmS0liqvJzastt7w== X-Received: by 2002:a05:6a00:8c11:b0:6f0:b53c:dfb4 with SMTP id d2e1a72fcca58-6f8f3e7d47emr1398064b3a.22.1716528987279; Thu, 23 May 2024 22:36:27 -0700 (PDT) From: Akihiko Odaki Date: Fri, 24 May 2024 14:35:49 +0900 Subject: [PATCH v4 3/4] qapi: Do not cast function pointers MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20240524-xkb-v4-3-2de564e5c859@daynix.com> References: <20240524-xkb-v4-0-2de564e5c859@daynix.com> In-Reply-To: <20240524-xkb-v4-0-2de564e5c859@daynix.com> To: Michael Tokarev , Laurent Vivier , Paolo Bonzini , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= , Wainer dos Santos Moschetta , Beraldo Leal , Richard Henderson , Laurent Vivier Cc: qemu-devel@nongnu.org, Akihiko Odaki X-Mailer: b4 0.14-dev-01a33 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: none client-ip=2607:f8b0:4864:20::434; envelope-from=akihiko.odaki@daynix.com; helo=mail-pf1-x434.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @daynix-com.20230601.gappssmtp.com) X-ZM-MESSAGEID: 1716529075412100001 -fsanitize=3Dundefined complains if function pointers are casted. It also prevents enabling teh strict mode of CFI which is currently disabled with -fsanitize-cfi-icall-generalize-pointers. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2346 Signed-off-by: Akihiko Odaki Reviewed-by: Markus Armbruster --- include/qapi/clone-visitor.h | 37 ++++++++++++++++++++++++------------- qapi/qapi-clone-visitor.c | 30 ++++-------------------------- 2 files changed, 28 insertions(+), 39 deletions(-) diff --git a/include/qapi/clone-visitor.h b/include/qapi/clone-visitor.h index adf9a788e232..ebc182b034d7 100644 --- a/include/qapi/clone-visitor.h +++ b/include/qapi/clone-visitor.h @@ -11,6 +11,7 @@ #ifndef QAPI_CLONE_VISITOR_H #define QAPI_CLONE_VISITOR_H =20 +#include "qapi/error.h" #include "qapi/visitor.h" =20 /* @@ -20,11 +21,8 @@ */ typedef struct QapiCloneVisitor QapiCloneVisitor; =20 -void *qapi_clone(const void *src, bool (*visit_type)(Visitor *, const char= *, - void **, Error **)); -void qapi_clone_members(void *dst, const void *src, size_t sz, - bool (*visit_type_members)(Visitor *, void *, - Error **)); +Visitor *qapi_clone_visitor_new(void); +Visitor *qapi_clone_members_visitor_new(void); =20 /* * Deep-clone QAPI object @src of the given @type, and return the result. @@ -32,10 +30,18 @@ void qapi_clone_members(void *dst, const void *src, siz= e_t sz, * Not usable on QAPI scalars (integers, strings, enums), nor on a * QAPI object that references the 'any' type. Safe when @src is NULL. */ -#define QAPI_CLONE(type, src) \ - ((type *)qapi_clone(src, \ - (bool (*)(Visitor *, const char *, void **, \ - Error **))visit_type_ ## type)) +#define QAPI_CLONE(type, src) \ + ({ \ + Visitor *v_; \ + type *dst_ =3D (type *) (src); /* Cast away const */ \ + \ + if (dst_) { \ + v_ =3D qapi_clone_visitor_new(); \ + visit_type_ ## type(v_, NULL, &dst_, &error_abort); \ + visit_free(v_); \ + } \ + dst_; \ + }) =20 /* * Copy deep clones of @type members from @src to @dst. @@ -43,9 +49,14 @@ void qapi_clone_members(void *dst, const void *src, size= _t sz, * Not usable on QAPI scalars (integers, strings, enums), nor on a * QAPI object that references the 'any' type. */ -#define QAPI_CLONE_MEMBERS(type, dst, src) \ - qapi_clone_members(dst, src, sizeof(type), \ - (bool (*)(Visitor *, void *, \ - Error **))visit_type_ ## type ## _members) +#define QAPI_CLONE_MEMBERS(type, dst, src) \ + ({ \ + Visitor *v_; \ + \ + v_ =3D qapi_clone_members_visitor_new(); = \ + *(type *)(dst) =3D *(src); = \ + visit_type_ ## type ## _members(v_, (type *)(dst), &error_abort); \ + visit_free(v_); \ + }) =20 #endif diff --git a/qapi/qapi-clone-visitor.c b/qapi/qapi-clone-visitor.c index c45c5caa3b89..bbf953698f38 100644 --- a/qapi/qapi-clone-visitor.c +++ b/qapi/qapi-clone-visitor.c @@ -149,7 +149,7 @@ static void qapi_clone_free(Visitor *v) g_free(v); } =20 -static Visitor *qapi_clone_visitor_new(void) +Visitor *qapi_clone_visitor_new(void) { QapiCloneVisitor *v; =20 @@ -174,31 +174,9 @@ static Visitor *qapi_clone_visitor_new(void) return &v->visitor; } =20 -void *qapi_clone(const void *src, bool (*visit_type)(Visitor *, const char= *, - void **, Error **)) +Visitor *qapi_clone_members_visitor_new(void) { - Visitor *v; - void *dst =3D (void *) src; /* Cast away const */ - - if (!src) { - return NULL; - } - - v =3D qapi_clone_visitor_new(); - visit_type(v, NULL, &dst, &error_abort); - visit_free(v); - return dst; -} - -void qapi_clone_members(void *dst, const void *src, size_t sz, - bool (*visit_type_members)(Visitor *, void *, - Error **)) -{ - Visitor *v; - - v =3D qapi_clone_visitor_new(); - memcpy(dst, src, sz); + Visitor *v =3D qapi_clone_visitor_new(); to_qcv(v)->depth++; - visit_type_members(v, dst, &error_abort); - visit_free(v); + return v; } --=20 2.45.1 From nobody Mon Nov 25 07:51:42 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1716529030; cv=none; d=zohomail.com; s=zohoarc; b=X7nRyUb5TTtVd4vJbN7l8pLxNc2fphpiMotYKmJSRXZPxuMaQkgaFtONNgYepRBKWLbam9j5BxxJQflFKmBS637hD6vYsu8iQ1oEfNmrZdRBhHbcZPzfgo/4OMuJ4qed9l2yvjtQh6aKKEXPQscoAtcNwKo7OWFUFx7rhyeLmbM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1716529030; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=10rXCiXiyOJFrRF1ZmnZJe2ca8m+9/pLyEiZ68FqHXk=; b=U0RsaYBsa7GR2CY1u7RtpcGSN6MgZJ0yufUnJ6eSrnaISEIRo74VPzS3VO0kc/uTiDBU9flNCUo8R0weZ4fAh8u7io3Jj1BD9IEJkb1N6tzxELHgbIhoOcsxX2gaQDsk4XrIrsMIn+rhyAfqJDId65YgYg4D/P+Wv2bImou/874= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1716529030677587.1110348105341; Thu, 23 May 2024 22:37:10 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sANbZ-0008Dh-VP; Fri, 24 May 2024 01:36:37 -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 1sANbY-0008DH-2i for qemu-devel@nongnu.org; Fri, 24 May 2024 01:36:36 -0400 Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sANbV-00015t-8z for qemu-devel@nongnu.org; Fri, 24 May 2024 01:36:35 -0400 Received: by mail-pf1-x429.google.com with SMTP id d2e1a72fcca58-6f693306b7cso3493501b3a.1 for ; Thu, 23 May 2024 22:36:32 -0700 (PDT) Received: from localhost ([157.82.204.135]) by smtp.gmail.com with UTF8SMTPSA id d9443c01a7336-1f44c9a9e1esm5162565ad.239.2024.05.23.22.36.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 23 May 2024 22:36:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20230601.gappssmtp.com; s=20230601; t=1716528992; x=1717133792; darn=nongnu.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=10rXCiXiyOJFrRF1ZmnZJe2ca8m+9/pLyEiZ68FqHXk=; b=fX8MIogSvhIWtKcXGW2PRN6Vdp57QslwG0+gxJAifJur6ePnJQqKmy9wUZbZrZQqS0 XnMsaXcGimx2J+VCV1QSndsOzBZcBU4Lu74j7nBuu6x7O3TxWmH9tbAPJggpXztBwRme 3VpOmBHgSXO9brYtvuHY51vt55yiqF0QxaGyr7bypseSSMYJLdJ1Z47Gr3syfickHnFw 8r2j2gZ6c9Y7IuwVgBKBY6os7hk5mlS/dqFk0ry6UaD9x3jMQuLmrjR3gjy+D0CWUD3o a7YbvDT/BEOkw1o04iBFdv1pwHzJvI5Vtip0Unr7plAAxsFuWzoVzDRr+9cvT1XswS17 hPOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716528992; x=1717133792; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=10rXCiXiyOJFrRF1ZmnZJe2ca8m+9/pLyEiZ68FqHXk=; b=EVyK4ljLdZWgQzQjODXGpx5J6tNW88R0EF4ZqwE52c0PaoUvjIX4VxiMB+RxuoSTi/ yPw+0EAVJ3c5Bap3dSHmIbgCJ21XuQW7WyidVPj3CwHeLWyK03jRxfYmp9g7xX/qd1v/ HI+dq1+qjDZGJ8uJTaPLttCyQuglETOs9DT4OcaHVLojJ6NDUElsHt33ziXQXLLTjpb/ SWEhez3QCdiOV3gLjFdtwRRiAWhvfT2reUL6mpUF5oFRXHHVOrUKfP99uhxYqSoldUu7 uPm3yJ+WPIlddS1LIZNk59obomQjtfTlg/FOlBYs9C+JID1wKdG7042T3jICN27wd4Q8 VnUA== X-Gm-Message-State: AOJu0Yy3fjr2feslCCabXiBlMDChdeA90zelAMKipC8zUkoHYYn5WTnp h+xCaDuyzBjw5MLxEwvJRDKvwb/VO3uvEXOdZku8vz/yW5LaqP7VYgYJErtUcG0= X-Google-Smtp-Source: AGHT+IHAFcUbocCo763YSNdClc19cPCcfPF+H3v6wUIl8GaDdbSfIKestKwYt2bgjdQbhsRIWIP+Rg== X-Received: by 2002:a05:6a20:3208:b0:1b0:2826:9e2 with SMTP id adf61e73a8af0-1b212d49917mr1383594637.31.1716528991766; Thu, 23 May 2024 22:36:31 -0700 (PDT) From: Akihiko Odaki Date: Fri, 24 May 2024 14:35:50 +0900 Subject: [PATCH v4 4/4] meson: Drop the .fa library suffix MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20240524-xkb-v4-4-2de564e5c859@daynix.com> References: <20240524-xkb-v4-0-2de564e5c859@daynix.com> In-Reply-To: <20240524-xkb-v4-0-2de564e5c859@daynix.com> To: Michael Tokarev , Laurent Vivier , Paolo Bonzini , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= , Wainer dos Santos Moschetta , Beraldo Leal , Richard Henderson , Laurent Vivier Cc: qemu-devel@nongnu.org, Akihiko Odaki X-Mailer: b4 0.14-dev-01a33 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: none client-ip=2607:f8b0:4864:20::429; envelope-from=akihiko.odaki@daynix.com; helo=mail-pf1-x429.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @daynix-com.20230601.gappssmtp.com) X-ZM-MESSAGEID: 1716529032428100003 The non-standard .fa library suffix breaks the link source de-duplication done by Meson so drop it. The lack of link source de-duplication causes AddressSanitizer to complain ODR violations, and makes GNU ld abort when combined with clang's LTO. Previously, the non-standard suffix was necessary for fork-fuzzing. Meson wraps all standard-suffixed libraries with --start-group and --end-group. This made a fork-fuzz.ld linker script wrapped as well and broke builds. Commit d2e6f9272d33 ("fuzz: remove fork-fuzzing scaffolding") dropped fork-fuzzing so we can now restore the standard suffix. The occurences of the suffix were detected and removed by performing a tree-wide search with 'fa' and .fa (note the quotes and dot). Signed-off-by: Akihiko Odaki --- docs/devel/build-system.rst | 5 ----- meson.build | 17 ++--------------- stubs/blk-exp-close-all.c | 2 +- .gitlab-ci.d/buildtest-template.yml | 2 -- .gitlab-ci.d/buildtest.yml | 2 -- gdbstub/meson.build | 2 -- tcg/meson.build | 2 -- tests/Makefile.include | 2 +- tests/qtest/libqos/meson.build | 1 - 9 files changed, 4 insertions(+), 31 deletions(-) diff --git a/docs/devel/build-system.rst b/docs/devel/build-system.rst index 09caf2f8e199..5baf027b7614 100644 --- a/docs/devel/build-system.rst +++ b/docs/devel/build-system.rst @@ -236,15 +236,10 @@ Subsystem sourcesets: are then turned into static libraries as follows:: =20 libchardev =3D static_library('chardev', chardev_ss.sources(), - name_suffix: 'fa', build_by_default: false) =20 chardev =3D declare_dependency(link_whole: libchardev) =20 - As of Meson 0.55.1, the special ``.fa`` suffix should be used for everyt= hing - that is used with ``link_whole``, to ensure that the link flags are plac= ed - correctly in the command line. - Target-independent emulator sourcesets: Various general purpose helper code is compiled only once and the .o files are linked into all output binaries that need it. diff --git a/meson.build b/meson.build index 91a0aa64c640..d6549722b50d 100644 --- a/meson.build +++ b/meson.build @@ -3462,14 +3462,12 @@ endif qom_ss =3D qom_ss.apply({}) libqom =3D static_library('qom', qom_ss.sources() + genh, dependencies: [qom_ss.dependencies()], - name_suffix: 'fa', build_by_default: false) qom =3D declare_dependency(link_whole: libqom) =20 event_loop_base =3D files('event-loop-base.c') event_loop_base =3D static_library('event-loop-base', sources: event_loop_base + genh, - name_suffix: 'fa', build_by_default: false) event_loop_base =3D declare_dependency(link_whole: event_loop_base, dependencies: [qom]) @@ -3703,7 +3701,6 @@ qemu_syms =3D custom_target('qemu.syms', output: 'qem= u.syms', authz_ss =3D authz_ss.apply({}) libauthz =3D static_library('authz', authz_ss.sources() + genh, dependencies: [authz_ss.dependencies()], - name_suffix: 'fa', build_by_default: false) =20 authz =3D declare_dependency(link_whole: libauthz, @@ -3712,7 +3709,6 @@ authz =3D declare_dependency(link_whole: libauthz, crypto_ss =3D crypto_ss.apply({}) libcrypto =3D static_library('crypto', crypto_ss.sources() + genh, dependencies: [crypto_ss.dependencies()], - name_suffix: 'fa', build_by_default: false) =20 crypto =3D declare_dependency(link_whole: libcrypto, @@ -3722,13 +3718,11 @@ io_ss =3D io_ss.apply({}) libio =3D static_library('io', io_ss.sources() + genh, dependencies: [io_ss.dependencies()], link_with: libqemuutil, - name_suffix: 'fa', build_by_default: false) =20 io =3D declare_dependency(link_whole: libio, dependencies: [crypto, qom]) =20 libmigration =3D static_library('migration', sources: migration_files + ge= nh, - name_suffix: 'fa', build_by_default: false) migration =3D declare_dependency(link_with: libmigration, dependencies: [zlib, qom, io]) @@ -3738,7 +3732,6 @@ block_ss =3D block_ss.apply({}) libblock =3D static_library('block', block_ss.sources() + genh, dependencies: block_ss.dependencies(), link_depends: block_syms, - name_suffix: 'fa', build_by_default: false) =20 block =3D declare_dependency(link_whole: [libblock], @@ -3748,7 +3741,6 @@ block =3D declare_dependency(link_whole: [libblock], blockdev_ss =3D blockdev_ss.apply({}) libblockdev =3D static_library('blockdev', blockdev_ss.sources() + genh, dependencies: blockdev_ss.dependencies(), - name_suffix: 'fa', build_by_default: false) =20 blockdev =3D declare_dependency(link_whole: [libblockdev], @@ -3757,13 +3749,11 @@ blockdev =3D declare_dependency(link_whole: [libblo= ckdev], qmp_ss =3D qmp_ss.apply({}) libqmp =3D static_library('qmp', qmp_ss.sources() + genh, dependencies: qmp_ss.dependencies(), - name_suffix: 'fa', build_by_default: false) =20 qmp =3D declare_dependency(link_whole: [libqmp]) =20 libchardev =3D static_library('chardev', chardev_ss.sources() + genh, - name_suffix: 'fa', dependencies: chardev_ss.dependencies(), build_by_default: false) =20 @@ -3771,7 +3761,6 @@ chardev =3D declare_dependency(link_whole: libchardev) =20 hwcore_ss =3D hwcore_ss.apply({}) libhwcore =3D static_library('hwcore', sources: hwcore_ss.sources() + genh, - name_suffix: 'fa', build_by_default: false) hwcore =3D declare_dependency(link_whole: libhwcore) common_ss.add(hwcore) @@ -3807,8 +3796,7 @@ common_all =3D static_library('common', sources: common_ss.all_sources() + genh, include_directories: common_user_inc, implicit_include_directories: false, - dependencies: common_ss.all_dependencies(), - name_suffix: 'fa') + dependencies: common_ss.all_dependencies()) =20 feature_to_c =3D find_program('scripts/feature_to_c.py') =20 @@ -3909,8 +3897,7 @@ foreach target : target_dirs objects: objects, include_directories: target_inc, c_args: c_args, - build_by_default: false, - name_suffix: 'fa') + build_by_default: false) =20 if target.endswith('-softmmu') execs =3D [{ diff --git a/stubs/blk-exp-close-all.c b/stubs/blk-exp-close-all.c index 1c7131676392..2f68e06d7d05 100644 --- a/stubs/blk-exp-close-all.c +++ b/stubs/blk-exp-close-all.c @@ -1,7 +1,7 @@ #include "qemu/osdep.h" #include "block/export.h" =20 -/* Only used in programs that support block exports (libblockdev.fa) */ +/* Only used in programs that support block exports (libblockdev.a) */ void blk_exp_close_all(void) { } diff --git a/.gitlab-ci.d/buildtest-template.yml b/.gitlab-ci.d/buildtest-t= emplate.yml index 22045add8064..69e468a576ba 100644 --- a/.gitlab-ci.d/buildtest-template.yml +++ b/.gitlab-ci.d/buildtest-template.yml @@ -45,10 +45,8 @@ exclude: - build/**/*.p - build/**/*.a.p - - build/**/*.fa.p - build/**/*.c.o - build/**/*.c.o.d - - build/**/*.fa =20 .common_test_job_template: extends: .base_job_template diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml index cfdff175c389..c156e6f1d90e 100644 --- a/.gitlab-ci.d/buildtest.yml +++ b/.gitlab-ci.d/buildtest.yml @@ -178,10 +178,8 @@ build-previous-qemu: exclude: - build-previous/**/*.p - build-previous/**/*.a.p - - build-previous/**/*.fa.p - build-previous/**/*.c.o - build-previous/**/*.c.o.d - - build-previous/**/*.fa needs: job: amd64-opensuse-leap-container variables: diff --git a/gdbstub/meson.build b/gdbstub/meson.build index da5721d8452b..c91e398ae726 100644 --- a/gdbstub/meson.build +++ b/gdbstub/meson.build @@ -19,13 +19,11 @@ gdb_system_ss =3D gdb_system_ss.apply({}) =20 libgdb_user =3D static_library('gdb_user', gdb_user_ss.sources() + genh, - name_suffix: 'fa', c_args: '-DCONFIG_USER_ONLY', build_by_default: false) =20 libgdb_system =3D static_library('gdb_system', gdb_system_ss.sources() + genh, - name_suffix: 'fa', build_by_default: false) =20 gdb_user =3D declare_dependency(link_whole: libgdb_user) diff --git a/tcg/meson.build b/tcg/meson.build index 8251589fd4e9..f941413d5801 100644 --- a/tcg/meson.build +++ b/tcg/meson.build @@ -31,7 +31,6 @@ tcg_ss =3D tcg_ss.apply({}) =20 libtcg_user =3D static_library('tcg_user', tcg_ss.sources() + genh, - name_suffix: 'fa', c_args: '-DCONFIG_USER_ONLY', build_by_default: false) =20 @@ -41,7 +40,6 @@ user_ss.add(tcg_user) =20 libtcg_system =3D static_library('tcg_system', tcg_ss.sources() + genh, - name_suffix: 'fa', c_args: '-DCONFIG_SOFTMMU', build_by_default: false) =20 diff --git a/tests/Makefile.include b/tests/Makefile.include index c9d1674bd070..d39d5dd6a43e 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -87,7 +87,7 @@ distclean-tcg: $(DISTCLEAN_TCG_TARGET_RULES) .PHONY: check-venv check-avocado check-acceptance check-acceptance-depreca= ted-warning =20 # Build up our target list from the filtered list of ninja targets -TARGETS=3D$(patsubst libqemu-%.fa, %, $(filter libqemu-%.fa, $(ninja-targe= ts))) +TARGETS=3D$(patsubst libqemu-%.a, %, $(filter libqemu-%.a, $(ninja-targets= ))) =20 TESTS_VENV_TOKEN=3D$(BUILD_DIR)/pyvenv/tests.group TESTS_RESULTS_DIR=3D$(BUILD_DIR)/tests/results diff --git a/tests/qtest/libqos/meson.build b/tests/qtest/libqos/meson.build index 3aed6efcb8d1..45b81c83ade3 100644 --- a/tests/qtest/libqos/meson.build +++ b/tests/qtest/libqos/meson.build @@ -68,7 +68,6 @@ if have_virtfs endif =20 libqos =3D static_library('qos', libqos_srcs + genh, - name_suffix: 'fa', build_by_default: false) =20 qos =3D declare_dependency(link_whole: libqos) --=20 2.45.1