From patchwork Thu Dec 21 10:38:16 2023 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: 756995 Delivered-To: patch@linaro.org Received: by 2002:a5d:67c6:0:b0:336:6142:bf13 with SMTP id n6csp815838wrw; Thu, 21 Dec 2023 02:41:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IHDWbi9ZYeIaqxIm2o3LsAtWXNOQvntKVXQQIj4NoOE9U1Upx+l5HBxhhs6t+uUK+9tJJCE X-Received: by 2002:a05:620a:45a6:b0:777:73e8:e24d with SMTP id bp38-20020a05620a45a600b0077773e8e24dmr29187388qkb.21.1703155308756; Thu, 21 Dec 2023 02:41:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703155308; cv=none; d=google.com; s=arc-20160816; b=L/fFNPTk8PmenJkRq1OxpjC4zKi+MKJ1RC2Lu1C8H4s9IUH4AUN4yd7eek2pc9dHeX ApfYBvJrxFFu7FGJ4OgA88tEpTTgkFJ7anz5NeYVEzrMUFMAfkpxH4kRfM98mGuC5qk0 2fVH3ddWP/2FVc10RwIVaUNsm1N7SMgju8cVhCOwmMTETs+xACVpP7w4nP2eEOXB48l7 iT8mS+AfuIKp/auDvaketkxC2lbW9ngQeCitH3253hR3Fewpaw7c2pFNPXJ/8+yJ00Td M4tzRRstYFg97SXsA+oehJ01pANaITbfeT7VEOQLfV9bgtZyVEM1uMAcXM2L0VWBXAz0 hl2A== 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=TjgnYFLBOv5uB2tWkg/kIZdJs8xT0wOiNJtUez299cQ=; fh=/x/VuKbJqq/JDyBDl+INLKIronWsd/HPhxkyxLC6mng=; b=vK0+Nx/AZcRZHkJzV5kT8pBcRl6u61zHnPhYyG6yv7YmWEceou8GKRj9HjbrAtWtQ7 GqzI7+Lz5uj9wfyLnzd4LGBjXdu6In9bUSaYNz+sGA7zYWjOlGqsU41eUZ/RL9RrRGV7 vA3gF0waEOEYdx4oxDI2bteD3zQB79geGNFArlbyAfJD96KXUzx9IuLRdctVfjHwUrzl Qzhk4Co0dseTafQYr69g5hNRrpcZ4nlH+SAK/iD814S+WL0+MJs3V2PWP6uLLpV4/ms0 dbjEtOLLECp34B3FAOyuF+0cQs8V48eUOHbnTNE0qFJRG6Dcr2+CuNjaRGPFTxwlMdRL EmXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=S1mw+Hqt; 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 g7-20020a05620a108700b0078104c9b94fsi1783652qkk.447.2023.12.21.02.41.48 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 21 Dec 2023 02:41:48 -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=S1mw+Hqt; 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 1rGGSZ-0004pN-C2; Thu, 21 Dec 2023 05:39:23 -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 1rGGSC-0004T5-Es for qemu-devel@nongnu.org; Thu, 21 Dec 2023 05:39:05 -0500 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rGGRt-0004Hd-U3 for qemu-devel@nongnu.org; Thu, 21 Dec 2023 05:39:00 -0500 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-3368ae75082so177930f8f.1 for ; Thu, 21 Dec 2023 02:38:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1703155119; x=1703759919; 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=S1mw+Hqt/xNnpAV+2zt4a4wKYzuxyITzvuaQYTvf2J+hAGTCmJGG4JuFSfa2Ku+84J OUiRZiOP64cVac/Fp1D//geo4UqPIgQMPLWKsrZkE1nAtydyura9uaGugRbqTOiBilBZ k5ljynlxT5L0HARWELvtkp3KZX1Om8axx047REz6es3zmXpAdI1J6dM5z8yTvr98gYuG mXrO6UxflhTk1aYO7B4rK8ALWdQPYiwZ3LOlx3yysnp/qInDsq6ZYeL7xR07sI5fvFOC ivShR5/OUUni/bLVtfXVPlrr9Ear59eH/uI9B0SVnORDpEGEWacVa6b8B14tlzuoBeqb L/Wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703155119; x=1703759919; 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=tvypgEhpWsacOhlN2RGmAacnL0YHyU1sv0Dennz8tGVjHPPfz8Duu/V8PVem5UREWl 5EHJo920BTKHT/uwpn8A3xrM44ud7cNXn/C94FDUxt/QnRCnNbTSsFTBl6Tmdirdhw5m HNHC064abWDWiSWDOUVNDqOlVYWvHwlitnQYFDpAm1WFoTTdCzdDYfmfdmCr5z3NZilE RfrtdUVHcBzTYdxlE3xC9rPAaQ30A7AruUOeth7lUdjGuVpfiHnIG61v0HRYZQ5kBL4X ONItNvY8SuirhgnTY514RSx4gAs19vzUs9MSlDTT7JFiMobeosxynmetAX+li/lW4Rv+ 5arw== X-Gm-Message-State: AOJu0YwPCFTcefA+0/bVUP0kK7htoqIJiG4R8pYqbJiNs2aqJdBau4Ju Ng4oGteoDbDCPCp6ca+DoOLKDw== X-Received: by 2002:a05:600c:35d4:b0:40d:3ff7:9bd7 with SMTP id r20-20020a05600c35d400b0040d3ff79bd7mr273696wmq.143.1703155118806; Thu, 21 Dec 2023 02:38:38 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id w19-20020a05600c475300b0040c4620b9fasm2789726wmo.11.2023.12.21.02.38.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 02:38:34 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id D5F765F90D; Thu, 21 Dec 2023 10:38:22 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: "Edgar E. Iglesias" , John Snow , Aurelien Jarno , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Yanan Wang , Eduardo Habkost , Brian Cain , Laurent Vivier , Palmer Dabbelt , Cleber Rosa , David Hildenbrand , Beraldo Leal , Pierrick Bouvier , Weiwei Li , =?utf-8?q?Alex_Benn=C3=A9e?= , Paul Durrant , qemu-s390x@nongnu.org, David Woodhouse , Liu Zhiwei , Ilya Leoshkevich , Wainer dos Santos Moschetta , Michael Rolnik , Alistair Francis , Daniel Henrique Barboza , Laurent Vivier , kvm@vger.kernel.org, =?utf-8?q?Marc-An?= =?utf-8?q?dr=C3=A9_Lureau?= , Alexandre Iooss , Thomas Huth , Peter Maydell , qemu-ppc@nongnu.org, Paolo Bonzini , Marcel Apfelbaum , Nicholas Piggin , qemu-riscv@nongnu.org, qemu-arm@nongnu.org, Song Gao , Yoshinori Sato , Richard Henderson , Daniel Henrique Barboza , =?utf-8?q?C=C3=A9dric_?= =?utf-8?q?Le_Goater?= , Mahmoud Mandour , Bin Meng Subject: [PATCH 38/40] contrib/plugins: fix imatch Date: Thu, 21 Dec 2023 10:38:16 +0000 Message-Id: <20231221103818.1633766-39-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231221103818.1633766-1-alex.bennee@linaro.org> References: <20231221103818.1633766-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x431.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+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. Signed-off-by: Alex Bennée --- 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)