From patchwork Wed May 22 10:48:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akihiko Odaki X-Patchwork-Id: 1937803 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=daynix-com.20230601.gappssmtp.com header.i=@daynix-com.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=bvU2muSu; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Vkp380Gslz2020 for ; Wed, 22 May 2024 20:49:39 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s9jWj-0000Qu-Ic; Wed, 22 May 2024 06:48:57 -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 1s9jWf-0000Q6-S4 for qemu-devel@nongnu.org; Wed, 22 May 2024 06:48:53 -0400 Received: from mail-oa1-x2d.google.com ([2001:4860:4864:20::2d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s9jWd-0002le-V7 for qemu-devel@nongnu.org; Wed, 22 May 2024 06:48:53 -0400 Received: by mail-oa1-x2d.google.com with SMTP id 586e51a60fabf-23f9d07829bso2580885fac.3 for ; Wed, 22 May 2024 03:48:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20230601.gappssmtp.com; s=20230601; t=1716374930; x=1716979730; 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=CwpNU0IOG2gR/Zc+cT2zm9xVHtaU1yJX2qDLOGZQyH4=; b=bvU2muSuSiBfvEEbPrKXCVK2tiQdF1FRSGQ1GmDrZawgSynPRP1G9vgTsGREbv/4Om R5rH1LZ1RtAJ/wIvOW3KgNKElwLvamwjNTB19ePNwQKggJllH/B8uwoJfTst9pUghpXO gZH2kOYfc2142ac2aY3yL56VrgRo9tKXtGQHBud4ZE5Cm812t/suSPbUsMdEQaw/MwCq BWv3/+ZPcaNCg1Hh9T5PfVa43D43edw8tIfKBSuQEDvN/DVWaYVh0/88K36sAiLmUgvx ztU3RkColKMaF1fxS7+tO58GySnPVF8tLnBAvAI7u7Q3JLwHZSsH5MKo5XnRGyujscAl hCdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716374930; x=1716979730; 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=CwpNU0IOG2gR/Zc+cT2zm9xVHtaU1yJX2qDLOGZQyH4=; b=Y9o1pEUpMbtJ8f2t7rTP2+/5IPIRPbiDavXP+gnqcddzsKbXmcs8/DURYvafx1pP0F U8xyRFsqxc2bZ3oNCSEseAIAFoJ0bnrklHXdjxA0CyYOfcIbngDZm4LsnnVZioCpZ+z4 hIV9SFk8w9F/f/eTXu1kn2hMgBj0Lg9V7B430NmFwQUWpGMK+Grx9lTUmJ9uMzDcKw5Y jWMI/2YGuiLAAZjc3zVDBZb0fkCkvu0TgJ6HifnKdBPwVwvdN0yZwlhfeXzt3i4BJUwj u+A+ZQlw7CQe2Z94Qy4hDZ2abQWPaMxkfypk7jMJmwYjIdzlTgkS4Gb0XVXACqvlHC+5 pY0Q== X-Gm-Message-State: AOJu0Yx8vgaxsMuCZ0+vwFbK4/Zf3VC4c+sNScHAcxghIzDfSCM+T4RM Ll16vi48Ro9H/VQQKcIrbnJNbVpTkTvJ01+9Ntxh9zzwr7ctajL4TNBrcbDCkYg= X-Google-Smtp-Source: AGHT+IE8UFIJdykobh8QqUszSeIPn4HDpPAWe+UJfgwwqU/dw3STvADjez3vQtZPEktAjqZcYnYTeA== X-Received: by 2002:a05:6870:6113:b0:24c:553d:7ac4 with SMTP id 586e51a60fabf-24c686fa93emr1751595fac.0.1716374930528; Wed, 22 May 2024 03:48:50 -0700 (PDT) Received: from localhost ([157.82.204.135]) by smtp.gmail.com with UTF8SMTPSA id d2e1a72fcca58-6f4d2afa7b5sm22120756b3a.163.2024.05.22.03.48.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 22 May 2024 03:48:50 -0700 (PDT) From: Akihiko Odaki Date: Wed, 22 May 2024 19:48:36 +0900 Subject: [PATCH v3 1/3] qemu-keymap: Free xkb allocations MIME-Version: 1.0 Message-Id: <20240522-xkb-v3-1-c429de860fa1@daynix.com> References: <20240522-xkb-v3-0-c429de860fa1@daynix.com> In-Reply-To: <20240522-xkb-v3-0-c429de860fa1@daynix.com> To: 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?= =?utf-8?q?_Benn=C3=A9e?= , Wainer dos Santos Moschetta , Beraldo Leal , Richard Henderson , Laurent Vivier , Michael Tokarev , Laurent Vivier Cc: qemu-devel@nongnu.org, Akihiko Odaki X-Mailer: b4 0.14-dev-01a33 Received-SPF: none client-ip=2001:4860:4864:20::2d; envelope-from=akihiko.odaki@daynix.com; helo=mail-oa1-x2d.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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This fixes LeakSanitizer complaints with xkbcommon 1.6.0. Signed-off-by: Akihiko Odaki --- qemu-keymap.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qemu-keymap.c b/qemu-keymap.c index 8c80f7a4ed65..7a9f38cf9863 100644 --- a/qemu-keymap.c +++ b/qemu-keymap.c @@ -237,6 +237,9 @@ int main(int argc, char *argv[]) xkb_state_unref(state); state = NULL; + xkb_keymap_unref(map); + xkb_context_unref(ctx); + /* add quirks */ fprintf(outfile, "\n" From patchwork Wed May 22 10:48:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akihiko Odaki X-Patchwork-Id: 1937804 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=daynix-com.20230601.gappssmtp.com header.i=@daynix-com.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=TqmqY+Lf; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Vkp3J6wHcz2020 for ; Wed, 22 May 2024 20:49:48 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s9jWn-0000Rh-3u; Wed, 22 May 2024 06:49:01 -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 1s9jWl-0000RD-Ma for qemu-devel@nongnu.org; Wed, 22 May 2024 06:48:59 -0400 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s9jWj-0002m3-7f for qemu-devel@nongnu.org; Wed, 22 May 2024 06:48:58 -0400 Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-1ee954e0aa6so9500015ad.3 for ; Wed, 22 May 2024 03:48:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20230601.gappssmtp.com; s=20230601; t=1716374935; x=1716979735; 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=mqM4Fspwb8wwQhVc9tE0YGZZP9YEJO9lu9jnW/1dzlY=; b=TqmqY+LfXVnFWSwURs1uZPTt7Yc2UK1/LDdetli49i1Qky21AGWV+yIxb27GrTASM+ 4CbJM6UXFcwi1g7fcHiIi5R913jet/92q8Em2WtQPyd0EtD9w3opziBVe0hKlC2Jt0p8 WwpsAVTws8NQ/14HzM6a2xapI36peuzPxts9hXMgpRi3IOdq4FCOFRo9zPOIGTRBK5p7 ZrtIL0arbZ3VtttT+ZpwRuliZ8zxK87KHLyGgFDyjdAyJS1/IvFi6nrm34uvoAIInUdi sZBGyMPiHqyNNxkU++KtUJIAOVQ4ntw+ue4MN9Iw8Voa9BYX1VvPvBEjdMDX2WI5yoPa R5XA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716374935; x=1716979735; 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=mqM4Fspwb8wwQhVc9tE0YGZZP9YEJO9lu9jnW/1dzlY=; b=t9NHc5kOT0Zu9iF7kjOqkInOiAlwrzBo8ELu9JaK38puroPGvRGWvdHNgvHFAZAUOj WLpZjUod6GNVd6LNRtSAr0EJzQIfR5GrwbdDcR6FdwLC05S2e5BMma/BlwHLUSlHEhus oAqSOOA/wOtk9XX18qVz1Cju+dLrTDR14zGvnGuhatZEfTrCjA5V+SUgGw5RmOyk+fZw eJVmtgbOEmHYRN9yC05/Eo7zptsHjeVy7SYfWspmXjs3SJeCxIdsVxSVUTlEyS9Z+XtJ x9Bqm3thiyID/+ScoDVeDK0AdKeigslyXpcMSlBHV/gP8V0QQSAA8wHme3YnPWKxkYxo b5RA== X-Gm-Message-State: AOJu0Yysgz+mEz/fgmeFNyUijJPBNu3cLo66s9N08s3RA0D8hXW9y+s6 iOCpZdD1fADk/mZN1vD953x5ZLM+/pgjjrCxCUp/sVcW5wr7OntXED5Dh0HirA0= X-Google-Smtp-Source: AGHT+IEqjwpbgxMA+QxeffW2GKUe+tunJzuVuUZfYu6H9GI6MQq89UkBEsfMJh3Ajsp8MV+kYf1UXA== X-Received: by 2002:a17:902:db06:b0:1f3:1036:a262 with SMTP id d9443c01a7336-1f31c95c473mr16912775ad.12.1716374934755; Wed, 22 May 2024 03:48:54 -0700 (PDT) Received: from localhost ([157.82.204.135]) by smtp.gmail.com with UTF8SMTPSA id d9443c01a7336-1f32e24f2bfsm3463285ad.238.2024.05.22.03.48.51 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 22 May 2024 03:48:54 -0700 (PDT) From: Akihiko Odaki Date: Wed, 22 May 2024 19:48:37 +0900 Subject: [PATCH v3 2/3] meson: Add -fno-sanitize=function MIME-Version: 1.0 Message-Id: <20240522-xkb-v3-2-c429de860fa1@daynix.com> References: <20240522-xkb-v3-0-c429de860fa1@daynix.com> In-Reply-To: <20240522-xkb-v3-0-c429de860fa1@daynix.com> To: 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?= =?utf-8?q?_Benn=C3=A9e?= , Wainer dos Santos Moschetta , Beraldo Leal , Richard Henderson , Laurent Vivier , Michael Tokarev , Laurent Vivier Cc: qemu-devel@nongnu.org, Akihiko Odaki X-Mailer: b4 0.14-dev-01a33 Received-SPF: none client-ip=2607:f8b0:4864:20::62f; envelope-from=akihiko.odaki@daynix.com; helo=mail-pl1-x62f.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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org -fsanitize=function enforces the consistency of function types, but include/qemu/lockable.h contains function pointer casts, which violate the rule. We already disables exact type checks for CFI with -fsanitize-cfi-icall-generalize-pointers so disable -fsanitize=function as well. Signed-off-by: Akihiko Odaki --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 91a0aa64c640..3c3ad0d5f5eb 100644 --- a/meson.build +++ b/meson.build @@ -298,7 +298,7 @@ endforeach qemu_common_flags = [ '-D_GNU_SOURCE', '-D_FILE_OFFSET_BITS=64', '-D_LARGEFILE_SOURCE', - '-fno-strict-aliasing', '-fno-common', '-fwrapv' ] + '-fno-sanitize=function', '-fno-strict-aliasing', '-fno-common', '-fwrapv' ] qemu_cflags = [] qemu_ldflags = [] From patchwork Wed May 22 10:48:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akihiko Odaki X-Patchwork-Id: 1937802 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=daynix-com.20230601.gappssmtp.com header.i=@daynix-com.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=iUcaKwQx; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Vkp2v0Y25z2020 for ; Wed, 22 May 2024 20:49:27 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s9jWq-0000Sm-R0; Wed, 22 May 2024 06:49:04 -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 1s9jWo-0000SG-Op for qemu-devel@nongnu.org; Wed, 22 May 2024 06:49:02 -0400 Received: from mail-pj1-x102f.google.com ([2607:f8b0:4864:20::102f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s9jWm-0002n9-HG for qemu-devel@nongnu.org; Wed, 22 May 2024 06:49:02 -0400 Received: by mail-pj1-x102f.google.com with SMTP id 98e67ed59e1d1-2b3646494a8so1954858a91.2 for ; Wed, 22 May 2024 03:49:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20230601.gappssmtp.com; s=20230601; t=1716374939; x=1716979739; 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=iAWYHo9maQ26YTZ5OmAOi2cyWIMPsi2QwpnzRxsbinM=; b=iUcaKwQxJVEwZtl8GfTpz8aA7SdD26jcrF0y0LwrCIUm6dnWIunOpWA7rKMF/diMKk WvLQUlsNyp3Awt35r3uIu3KS/jKxFM01Q4LHNl/kH+z/p4Vgq/z9bW8Uc3F+KKnMtdCM +IKG7cgZ+0saMUgrqiis9HmzBojM7rmTBc1Q0R11w45+jjONKtrNx0t7qWBHfdq/viQu 3kD7yX9sN7xLU9/7WgwjMZZ/6QySe+iUZX8dfJ0GZK/dy+vtzhwTq3V7SQ5rimEh4P5J iyP/inNx/BT5XHmfxQmgd5Xe1D+5S0k4CI5ykbLstblD9lk+P06uNNmUfWUCl/4aYWYI m7Wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716374939; x=1716979739; 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=iAWYHo9maQ26YTZ5OmAOi2cyWIMPsi2QwpnzRxsbinM=; b=tLmHTvd56UqK0ZKgWTvrNlzQisaHvmJp+q32Xjjff+5VbI/HUgbkjNm3c8EH2hP/vh jBTUznEFa0N+lpjuhRaadx83KWBMtE5oly3GKExvKh+Ly7YLwN7A+XazOc1vymuWK91I TdxUd/K4G6rYql/+YkODJ14NL8UadumLSRXpfzaNOYbaRGkB9zs9Hapl4PN6x+SkDf8O JQyqHxjNVveS6aRejLkP/s80T3I1Vla4Uf1FzrVk7l/jI8EkvG2/8crjA92ra38gnAFk c8DEJBsyWbv8ixLfzWc3CCbBBYRj7HW/TXm6bDZb4zycdeOekO8415LUISjNWQylo93G 8rpQ== X-Gm-Message-State: AOJu0YwyshQsnbjSzADEIHM1nXskkuR3KrJSgHenxcVzykDlg5CoLS0N gcT+uo2yVPkcxYGfKwGIm9uVxtMegktW3spzblaJp1fpAA+KPB6ABLR0TMWLJcI= X-Google-Smtp-Source: AGHT+IEX6nYGFmPAl2PDeHzkmcn2lafbkBKX6e7Ml/q2kqQBo2S5shALMjYBzBRg4LGm1QAJBvt3Fw== X-Received: by 2002:a17:90b:3118:b0:2b6:226a:c910 with SMTP id 98e67ed59e1d1-2bd9f5bc5f5mr1617506a91.36.1716374939023; Wed, 22 May 2024 03:48:59 -0700 (PDT) Received: from localhost ([157.82.204.135]) by smtp.gmail.com with UTF8SMTPSA id d9443c01a7336-1f3022bec42sm50511425ad.162.2024.05.22.03.48.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 22 May 2024 03:48:58 -0700 (PDT) From: Akihiko Odaki Date: Wed, 22 May 2024 19:48:38 +0900 Subject: [PATCH v3 3/3] meson: Drop the .fa library prefix MIME-Version: 1.0 Message-Id: <20240522-xkb-v3-3-c429de860fa1@daynix.com> References: <20240522-xkb-v3-0-c429de860fa1@daynix.com> In-Reply-To: <20240522-xkb-v3-0-c429de860fa1@daynix.com> To: 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?= =?utf-8?q?_Benn=C3=A9e?= , Wainer dos Santos Moschetta , Beraldo Leal , Richard Henderson , Laurent Vivier , Michael Tokarev , Laurent Vivier Cc: qemu-devel@nongnu.org, Akihiko Odaki X-Mailer: b4 0.14-dev-01a33 Received-SPF: none client-ip=2607:f8b0:4864:20::102f; envelope-from=akihiko.odaki@daynix.com; helo=mail-pj1-x102f.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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org The non-standard .fa library prefix 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 prefix was necessary for fork-fuzzing. Meson wraps all standard-prefixed 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 prefix. The occurences of the prefix 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:: libchardev = static_library('chardev', chardev_ss.sources(), - name_suffix: 'fa', build_by_default: false) chardev = declare_dependency(link_whole: libchardev) - As of Meson 0.55.1, the special ``.fa`` suffix should be used for everything - that is used with ``link_whole``, to ensure that the link flags are placed - 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 3c3ad0d5f5eb..9eaf218609eb 100644 --- a/meson.build +++ b/meson.build @@ -3462,14 +3462,12 @@ endif qom_ss = qom_ss.apply({}) libqom = static_library('qom', qom_ss.sources() + genh, dependencies: [qom_ss.dependencies()], - name_suffix: 'fa', build_by_default: false) qom = declare_dependency(link_whole: libqom) event_loop_base = files('event-loop-base.c') event_loop_base = static_library('event-loop-base', sources: event_loop_base + genh, - name_suffix: 'fa', build_by_default: false) event_loop_base = declare_dependency(link_whole: event_loop_base, dependencies: [qom]) @@ -3703,7 +3701,6 @@ qemu_syms = custom_target('qemu.syms', output: 'qemu.syms', authz_ss = authz_ss.apply({}) libauthz = static_library('authz', authz_ss.sources() + genh, dependencies: [authz_ss.dependencies()], - name_suffix: 'fa', build_by_default: false) authz = declare_dependency(link_whole: libauthz, @@ -3712,7 +3709,6 @@ authz = declare_dependency(link_whole: libauthz, crypto_ss = crypto_ss.apply({}) libcrypto = static_library('crypto', crypto_ss.sources() + genh, dependencies: [crypto_ss.dependencies()], - name_suffix: 'fa', build_by_default: false) crypto = declare_dependency(link_whole: libcrypto, @@ -3722,13 +3718,11 @@ io_ss = io_ss.apply({}) libio = static_library('io', io_ss.sources() + genh, dependencies: [io_ss.dependencies()], link_with: libqemuutil, - name_suffix: 'fa', build_by_default: false) io = declare_dependency(link_whole: libio, dependencies: [crypto, qom]) libmigration = static_library('migration', sources: migration_files + genh, - name_suffix: 'fa', build_by_default: false) migration = declare_dependency(link_with: libmigration, dependencies: [zlib, qom, io]) @@ -3738,7 +3732,6 @@ block_ss = block_ss.apply({}) libblock = static_library('block', block_ss.sources() + genh, dependencies: block_ss.dependencies(), link_depends: block_syms, - name_suffix: 'fa', build_by_default: false) block = declare_dependency(link_whole: [libblock], @@ -3748,7 +3741,6 @@ block = declare_dependency(link_whole: [libblock], blockdev_ss = blockdev_ss.apply({}) libblockdev = static_library('blockdev', blockdev_ss.sources() + genh, dependencies: blockdev_ss.dependencies(), - name_suffix: 'fa', build_by_default: false) blockdev = declare_dependency(link_whole: [libblockdev], @@ -3757,13 +3749,11 @@ blockdev = declare_dependency(link_whole: [libblockdev], qmp_ss = qmp_ss.apply({}) libqmp = static_library('qmp', qmp_ss.sources() + genh, dependencies: qmp_ss.dependencies(), - name_suffix: 'fa', build_by_default: false) qmp = declare_dependency(link_whole: [libqmp]) libchardev = static_library('chardev', chardev_ss.sources() + genh, - name_suffix: 'fa', dependencies: chardev_ss.dependencies(), build_by_default: false) @@ -3771,7 +3761,6 @@ chardev = declare_dependency(link_whole: libchardev) hwcore_ss = hwcore_ss.apply({}) libhwcore = static_library('hwcore', sources: hwcore_ss.sources() + genh, - name_suffix: 'fa', build_by_default: false) hwcore = declare_dependency(link_whole: libhwcore) common_ss.add(hwcore) @@ -3807,8 +3796,7 @@ common_all = 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()) feature_to_c = find_program('scripts/feature_to_c.py') @@ -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) if target.endswith('-softmmu') execs = [{ 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" -/* 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-template.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 .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 = gdb_system_ss.apply({}) libgdb_user = static_library('gdb_user', gdb_user_ss.sources() + genh, - name_suffix: 'fa', c_args: '-DCONFIG_USER_ONLY', build_by_default: false) libgdb_system = static_library('gdb_system', gdb_system_ss.sources() + genh, - name_suffix: 'fa', build_by_default: false) gdb_user = 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 = tcg_ss.apply({}) libtcg_user = static_library('tcg_user', tcg_ss.sources() + genh, - name_suffix: 'fa', c_args: '-DCONFIG_USER_ONLY', build_by_default: false) @@ -41,7 +40,6 @@ user_ss.add(tcg_user) libtcg_system = static_library('tcg_system', tcg_ss.sources() + genh, - name_suffix: 'fa', c_args: '-DCONFIG_SOFTMMU', build_by_default: false) 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-deprecated-warning # Build up our target list from the filtered list of ninja targets -TARGETS=$(patsubst libqemu-%.fa, %, $(filter libqemu-%.fa, $(ninja-targets))) +TARGETS=$(patsubst libqemu-%.a, %, $(filter libqemu-%.a, $(ninja-targets))) TESTS_VENV_TOKEN=$(BUILD_DIR)/pyvenv/tests.group TESTS_RESULTS_DIR=$(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 libqos = static_library('qos', libqos_srcs + genh, - name_suffix: 'fa', build_by_default: false) qos = declare_dependency(link_whole: libqos)