From nobody Tue Nov 26 22:23:05 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1704304075; cv=none; d=zohomail.com; s=zohoarc; b=dRFZ7xg3dCGDpoF2SNckLYsvinGJ/qZLh+qvZmoh7rF2XYBwUOn4WFJiZu4fyULlsEVo8mDDQJbwtEc4XCPyK326EPe1KHbHRPzwKkjj+UM/rAmHVO1qAxcT+WVzIg8Ip48DvycBRwpQ0y7WqS3I8CWajgWHIP0ipH5hb89tlfw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1704304075; 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=TjgnYFLBOv5uB2tWkg/kIZdJs8xT0wOiNJtUez299cQ=; b=S4j8JIJamm3Gdbiyu9zxHuTrUQQ+AmxV80+v4+RCKSWzYqUs+PoZpC5bZEZhYCzPh+2wYeyTXKXIju3AFUOWb65i/GKS1a2qFw7Hf29Av9zm5WQ/R41yFmCeHDeYgclhVz07hDlfQcQ/tEWPvBV1DZmgfG7pPQ3OIl1dWM05QG8= 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1704304075682689.6668678916146; Wed, 3 Jan 2024 09:47:55 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rL5DN-0007Z2-I7; Wed, 03 Jan 2024 12:39:37 -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 1rL5D5-0006FT-4O for qemu-devel@nongnu.org; Wed, 03 Jan 2024 12:39:20 -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 1rL5Cw-0000dg-AY for qemu-devel@nongnu.org; Wed, 03 Jan 2024 12:39:18 -0500 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-40d6b4e2945so55524895e9.0 for ; Wed, 03 Jan 2024 09:39:09 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id i15-20020a05600c354f00b0040d604dea3bsm2972869wmq.4.2024.01.03.09.39.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jan 2024 09:39:05 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 542725F9D4; Wed, 3 Jan 2024 17:33:53 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704303548; x=1704908348; 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=TjgnYFLBOv5uB2tWkg/kIZdJs8xT0wOiNJtUez299cQ=; b=W1qQNInEuA+Z2I8CU38mZRcMQ9lAXxekImthC6KfNg6T9pmsUqW591gAacpTuJc8dr /zs+EvWQy0Qu3cquBHgyFbpdgHcXe1G5YAFjPJgHPSCS5fLkPAei/+OBXo3UItHtG28l /gTFjebnnuO1J4+14JXiJDOaPgWVU7EOi7xjluJvN5GoETSNoGKh8q1jYn5oeoOXAZtw GabI1dRvoFzrQZEdWryPajahZNb6MnQyeTq7r2MyoOfu/65QRNgil9O7INVzDcBONGX4 tIfkr+roUYtCBB0L7lZ/DVd4knWGI2ScoP/bcolVteT+nTLDOiBREUwbPk7cTXjCha6l PHog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704303548; x=1704908348; 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=TjgnYFLBOv5uB2tWkg/kIZdJs8xT0wOiNJtUez299cQ=; b=wTOmbAm3sPNDrdwkn7fI6GomJ7/+IL8FwSI9Cnu7wFLcZnUzYvX2DgM7L21sMk1u1r IRAOPEVMsO06DnlNjcKHrlqpNblN9lhHKHhwUvM7X7TxwZnNs7HUgdsfllV9sG4nDIwB F4VyN8Oz4cT/teSm4pxCuF9q5lJ9INJaPPNPRu6Q3khTaEyUlm/uvyxkVBYNHCKia3XV fgYTdk2405HFvcR2Doi43Pxanibyp16w2S9qhH5TF/igPB+MEZxwiIOmUPpHaqq31o63 cLudpZtL/aLOXhe6nufVu5JJx34+wFIOcsnX6VH3kivfQDCuZWYvbZGaYNVn9/539WQz 9HoA== X-Gm-Message-State: AOJu0YxWT2udRknkZbEA+UAMYEvA0OqV2DCopj9tcKoSM6Yk4MQXV/BR fhh17c9Y1WIljYp38ttdgmbDkb6OprWnyQ== X-Google-Smtp-Source: AGHT+IECwsD+EsV7hgtfvLIigahdUQBBQ70d0NAK/wXl9lkOBh690IpgKO7C8ioQ4D+awmSxFlPX5A== X-Received: by 2002:a7b:cb92:0:b0:40d:38cd:ad5c with SMTP id m18-20020a7bcb92000000b0040d38cdad5cmr6656970wmi.263.1704303548411; Wed, 03 Jan 2024 09:39:08 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, qemu-ppc@nongnu.org, Richard Henderson , Song Gao , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , David Hildenbrand , Aurelien Jarno , Yoshinori Sato , Yanan Wang , Bin Meng , Laurent Vivier , Michael Rolnik , Alexandre Iooss , David Woodhouse , Laurent Vivier , Paolo Bonzini , Brian Cain , Daniel Henrique Barboza , Beraldo Leal , Paul Durrant , Mahmoud Mandour , Thomas Huth , Liu Zhiwei , Cleber Rosa , kvm@vger.kernel.org, Peter Maydell , Wainer dos Santos Moschetta , =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-arm@nongnu.org, Weiwei Li , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , John Snow , Daniel Henrique Barboza , Nicholas Piggin , Palmer Dabbelt , Marcel Apfelbaum , Ilya Leoshkevich , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , "Edgar E. Iglesias" , Eduardo Habkost , Pierrick Bouvier , qemu-riscv@nongnu.org, Alistair Francis Subject: [PATCH v2 39/43] contrib/plugins: fix imatch Date: Wed, 3 Jan 2024 17:33:45 +0000 Message-Id: <20240103173349.398526-40-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240103173349.398526-1-alex.bennee@linaro.org> References: <20240103173349.398526-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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: 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1704304077157100001 We can't directly save the ephemeral imatch from argv as that memory will get recycled. Signed-off-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- 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 =3D g_ptr_array_new(); } - g_ptr_array_add(imatches, match); + g_ptr_array_add(imatches, g_strdup(match)); } =20 static void parse_vaddr_match(char *match) --=20 2.39.2