From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C38E2C47DDF for ; Mon, 22 Jan 2024 15:05:11 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rRvo7-0008Uw-K4; Mon, 22 Jan 2024 10:01:51 -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 1rRvnx-0007w9-GE for qemu-devel@nongnu.org; Mon, 22 Jan 2024 10:01:44 -0500 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rRvnn-0001ml-Fx for qemu-devel@nongnu.org; Mon, 22 Jan 2024 10:01:41 -0500 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-40e8d3b29f2so39455465e9.1 for ; Mon, 22 Jan 2024 07:01:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1705935690; x=1706540490; 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=oBYV3ioTnLMX77Inn4NkF/S5eaRmjdDyEc7gyjwT3Lwga8ECk7yoiVFnoroY7RXfD+ naMtYfH//+Y1jbOtG5mUTD1HUFlrPS82fmXyc+EtKPSnhOiapF1GMtHeB0OSyMPyXGPx 1kZLNZ8JbnFQ8ofNGnYQ/oHWYMsp5uKIYfBo/lKSii6jFEybxfksrWGtRv65X2KulCP+ DyTEvkphJS/DhvQT4ecx4u0o6n0qYjSVmuWSWE9VM6CB23grH+yZ8kn8rHTyjjeWDYR2 1Tiq00FavXxfej8xNePv3mrN3kIeJknwrGVhm5U5evrGeOdYV9aZfqOfQ7jhGxb7XG+5 yARQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705935690; x=1706540490; 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=ZDYZ9Zd/yBqB3OhlbBzcNuA4dnn7L7LMr8JEsaiVNyGjqasNbuCz0lIglOjIFRlob5 Yi4RiVdSpNW1ScTOxZ0E8hi0wHahWq86O9Wm3kriYksjDA8min0RKDipfy5vRPgmnA9o WL51Lo+0YFmY7fzQEgdhh4A/bjzQGiAElsUfJe9rFPNhgMluO/Lxwv/PS1GF0YVg4s0O YFw5vll7UZ9QhQlAhO2xpKG2KvxYt08n0sPkSVCs/tgHetAwUPfx4AWhQWIDLmQn7J7k BtkYuGNYD8RTyfCu0IvRH1e0MI4vkNFptcP+ojIYaTR4AxxCGy37nbRt3eEE46fUG9bj 7okw== X-Gm-Message-State: AOJu0Yww9YXmpmH3f8CK4SKa3bigPIha/cg1NBep48GlUn5vmFfereVE 1Y0q+2EbYwsL7FpksVZwJMu61bVF1PIVPXmjltcL8hcwFKCTDyv/koxdAKDoLiY= X-Google-Smtp-Source: AGHT+IEwv0U3gluOvjzxJUPlNZ0yWsCpKsoao62m327xZ8POdVEwgy/zDswLP5yfB02fCPKJ5stsXQ== X-Received: by 2002:a05:600c:5403:b0:40e:a666:4729 with SMTP id he3-20020a05600c540300b0040ea6664729mr1258496wmb.278.1705935689716; Mon, 22 Jan 2024 07:01:29 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id v21-20020a05600c445500b0040d62f89381sm39534890wmn.35.2024.01.22.07.01.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 07:01:28 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id E12235F9D2; Mon, 22 Jan 2024 14:56:12 +0000 (GMT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Marcel Apfelbaum , "Edgar E. Iglesias" , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Michael Rolnik , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Laurent Vivier , kvm@vger.kernel.org, Yoshinori Sato , Pierrick Bouvier , Palmer Dabbelt , Liu Zhiwei , Laurent Vivier , Yanan Wang , qemu-ppc@nongnu.org, Weiwei Li , qemu-s390x@nongnu.org, =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Peter Maydell , Alexandre Iooss , John Snow , Mahmoud Mandour , Wainer dos Santos Moschetta , Richard Henderson , Ilya Leoshkevich , Alistair Francis , David Woodhouse , Cleber Rosa , Beraldo Leal , Bin Meng , Nicholas Piggin , Aurelien Jarno , Daniel Henrique Barboza , Daniel Henrique Barboza , Thomas Huth , David Hildenbrand , qemu-riscv@nongnu.org, qemu-arm@nongnu.org, Paolo Bonzini , Song Gao , Eduardo Habkost , Brian Cain , Paul Durrant Subject: [PATCH v3 18/21] contrib/plugins: fix imatch Date: Mon, 22 Jan 2024 14:56:07 +0000 Message-Id: <20240122145610.413836-19-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240122145610.413836-1-alex.bennee@linaro.org> References: <20240122145610.413836-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x333.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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.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) -- 2.39.2