From patchwork Fri Feb 16 16:30:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 773365 Delivered-To: patch@linaro.org Received: by 2002:a5d:4943:0:b0:33b:4db1:f5b3 with SMTP id r3csp28068wrs; Fri, 16 Feb 2024 08:39:10 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXvz6Lb06aA1PBby1gWADHWO+nWObJ1EVUsq5qcg12NtYkL3ZdDTOdHRl4yBHLeNiZwKHcNNc0LHFq0C3B/Ev6h X-Google-Smtp-Source: AGHT+IFZpZaKQW2VkAwgTahDXLad5nRPQMmBj/+Ns2eLsIMfzc4uEMGmz+jzRZYnl7tenf+xpyVj X-Received: by 2002:a05:6870:2214:b0:21e:5008:cf62 with SMTP id i20-20020a056870221400b0021e5008cf62mr5057314oaf.21.1708101550577; Fri, 16 Feb 2024 08:39:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708101550; cv=none; d=google.com; s=arc-20160816; b=U1Scn+xScpz8lEp4h0iNDkjPzPL1XB5aukMT/EGqgsWTHvTtWj19OtowR6LmdYM1Ds UmSJwwrkbTJ723U1W0bNUSNFSXBkcshZMUMcXGkYuE4//VqEFHftJQsPFJEA/7JuAm3H J7MMZfR7NV/YRy4d+DZQa5+tO5yOPL69qRGIgxy/JBvul6mSLyQc/3xxhP+nx8ciXa/6 rwtSk/PEfLbEEd7SrPQfP1Fr9oAJqqG0F5ODfaZcBVdqoNpdtqrei2iLkQwogtbj/y0q qyE3GII95P1YVArsEBnNIF+hCUmrGlgrKTktMkdmkeTRbgXqEC53YDHxdrM9JERnvk1c thtg== 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=eZ1nEd8NJNCNQAO45v/M0dXLXOT0Wd7jVxF+jov+Saw=; fh=BiCuxLgE2Qo8NnA5oZWxFqr6rT9EcPosGDdXLEV2jRw=; b=Ymd5lG68qr+7fOWlKPjlkT64oxtZ4NHeVEkazvXYgAHuJEpgiIRBbOcDXF0MrcN358 APy/8KmOPNVCqT8v2IohiVxXDclxrvqiSbwAddeXWflwzWMBXLdvpWyfkRFBrt7u1p/I exssPuyS+qhYIfqxxu+6j4pb6B6hIi7n4n9D2CuJ9VqrWYH191STTRal0YDMLxOg/nxk BLGmSy6WHVVFr5wnUmXDaHxUFt7V2Q+iA0zc2fzQX7hUmnWYbqcANRm8AfgJ0WBvH141 vY4ErwipT9edAriN6qpA+P1IE46VdaXA3BqIwWWEvIAoOfGPofforFDBlDQe/B1G7pjz /dMw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="VrH/reiF"; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id g25-20020ac870d9000000b0042c482bb37bsi131963qtp.743.2024.02.16.08.39.10 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 16 Feb 2024 08:39:10 -0800 (PST) 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="VrH/reiF"; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rb1Dg-0001Kc-Rf; Fri, 16 Feb 2024 11:37:48 -0500 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 1rb1Dd-0001GQ-N7 for qemu-devel@nongnu.org; Fri, 16 Feb 2024 11:37:45 -0500 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rb1DV-00044L-46 for qemu-devel@nongnu.org; Fri, 16 Feb 2024 11:37:45 -0500 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-4124907f6fcso5621165e9.1 for ; Fri, 16 Feb 2024 08:37:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708101455; x=1708706255; 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=eZ1nEd8NJNCNQAO45v/M0dXLXOT0Wd7jVxF+jov+Saw=; b=VrH/reiFDWQ2Db+w76f10YUdo6E5Rzi72ykbJ42OERHaUrnVwOxZpVCgnim0+hPHD4 +/Z3UsrUA/2Ga+7Gk7wnW3asDUOx6LZ/5FwI9+dUhvW1hr2ujTpWynxgf73GdL/BAKiY dC6LdEE3elUO7VUQynx1DovYUHVUxF8Gs7ts07jJWJ8PwZidt2ZTTB0CqdkdqNSu1810 MuD+e8OZqR/+pyMe7TNcBW5FIe0U8mbTiFfeL4FgFi1wsymP3gmfOTy3zw3nOKlw7j9P Xpe5ZTMxiqSPL9lZSMTqH5q23KFgeOpyf2AZu3KJJHwpXrLtfz4cbYgR2i2sTgON3GW5 G9Zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708101455; x=1708706255; 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=eZ1nEd8NJNCNQAO45v/M0dXLXOT0Wd7jVxF+jov+Saw=; b=lOYGlu8gqTTHH+lOSa41ThE+4TnWuysKf3/HhhATxxByewKu/wp7kWUU7jL+acPiKD kqqAIfVJ4v/Kxgv0t9JvFDfBz3MnlHiuSpLYjT1c+UDWKajMdkzxfPQMiQyt7SVn2JXs 79QwfywoGolgGv6y3l+f0yF8Y+iladAi0UIN91TBwF8+p+rBvr/Bf62KXi0Nyo8NYtbw vqT/DpAfMaucTW8ItktnmCdsf3QhTJZkJLriQ0LO4+uKOtbDe0BMJ4VvSiVfJxqigF9s sJA84VYbl85D5Ce6cjjxbb3YtlNjAU2AnJm6XdrX7cSJsIOXy2376++ppb87dWHl2peD Nb1g== X-Gm-Message-State: AOJu0YyBg70MzREopJjgOMEar9FjWO54/csDyndENKBSg3Afvd7vsXl5 tclzb02A2Jkah+PtdrDBba/dJsV/WrDMl38J3Yq5cSRejwuqShWyv0CUyu+mrrk= X-Received: by 2002:a05:600c:3591:b0:412:1d7d:6c5b with SMTP id p17-20020a05600c359100b004121d7d6c5bmr4016272wmq.10.1708101455308; Fri, 16 Feb 2024 08:37:35 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id bg22-20020a05600c3c9600b0040fc56712e8sm2881464wmb.17.2024.02.16.08.37.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 08:37:32 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 3919D5F9E5; Fri, 16 Feb 2024 16:30:28 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Yoshinori Sato , David Hildenbrand , Weiwei Li , Richard Henderson , Michael Rolnik , Ilya Leoshkevich , Peter Maydell , qemu-ppc@nongnu.org, Paolo Bonzini , qemu-riscv@nongnu.org, Cleber Rosa , Thomas Huth , Song Gao , qemu-arm@nongnu.org, Pierrick Bouvier , John Snow , =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?C=C3=A9dri?= =?utf-8?q?c_Le_Goater?= , Nicholas Piggin , qemu-s390x@nongnu.org, Laurent Vivier , "Edgar E. Iglesias" , Daniel Henrique Barboza , Yanan Wang , Palmer Dabbelt , Marcel Apfelbaum , Brian Cain , Mahmoud Mandour , Alexandre Iooss , Bin Meng , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Daniel Henrique Barboza , Eduardo Habkost , Alistair Francis , Liu Zhiwei Subject: [PATCH 19/23] contrib/plugins: fix imatch Date: Fri, 16 Feb 2024 16:30:21 +0000 Message-Id: <20240216163025.424857-20-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240216163025.424857-1-alex.bennee@linaro.org> References: <20240216163025.424857-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x32d.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 We can't directly save the ephemeral imatch from argv as that memory will get recycled. Message-Id: <20240103173349.398526-40-alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé --- contrib/plugins/execlog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/plugins/execlog.c b/contrib/plugins/execlog.c index 82dc2f584e2..f262e5555eb 100644 --- a/contrib/plugins/execlog.c +++ b/contrib/plugins/execlog.c @@ -199,7 +199,7 @@ static void parse_insn_match(char *match) if (!imatches) { imatches = g_ptr_array_new(); } - g_ptr_array_add(imatches, match); + g_ptr_array_add(imatches, g_strdup(match)); } static void parse_vaddr_match(char *match)