From patchwork Wed Feb 28 11:56:57 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: 776459 Delivered-To: patch@linaro.org Received: by 2002:adf:e94d:0:b0:33d:f458:43ce with SMTP id m13csp250858wrn; Wed, 28 Feb 2024 03:58:21 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUzEW1lCpNL1lxR1fp5tv0u3eCw6oMxitdKk56guszNjCmv/qjCKaIjnCfRw58UrZFduPkVD9rBDqbLjIDnWewK X-Google-Smtp-Source: AGHT+IF6uSNQ0KLxO+uFeFX1NXPdRKtqhLFZpBNW2sGPBv49J8ZGWQgWrrt0vdARLi5kikzKOxpY X-Received: by 2002:a0c:cd0f:0:b0:68f:60fd:d319 with SMTP id b15-20020a0ccd0f000000b0068f60fdd319mr4020608qvm.22.1709121500891; Wed, 28 Feb 2024 03:58:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1709121500; cv=none; d=google.com; s=arc-20160816; b=zS1SAcU7RFBYiFDy0+7yk/CjfGt6+7Pg9mGROYbW9ia0IoPXMiuOt7ASqLlcfPA2Zw dxel/f2Sona9hpoqpvb5ijxhP+Rr82Wr0XOJEzr9XDW8gOou1a7UOGfqQA7WO5xYPMQo ep9qE5xPFJ3fT1b+f2mED1FUHBcthnwI+FIQJ2NyMuz+Ur1IbBaeYsN1hKxRCQwgnXZO gZu6rghh13Z7jTsE4UP5ZrwEa/JJrWqZVcAV1gYwa2D2iZhib3NvhmoO2t7+Km5+Osm+ VLjWhOmL6gUrW2bL5xesJaVKtB2MOXOVI7exG6ekKjg1Kiizsg6RD1wcIA3PgatA8w5V 7HkQ== 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=Onyf0n7PQDnbuNd7HujOMaHnjKe5rcDTFcPdFWfXURM=; fh=wMx2pEWokZQt3/WejUyv0DjwzJbvjdRuhKfwHrLFRYw=; b=z9+C80xgg2uLIftkUM/K6UIRfqLNZ+/IktQZJ9yPy5xEkCLz/1DXEliWKpJfQPHmL+ 5hcWoZTRi40VCeyy0teFDnwO8dppFreKFzzp2ersS0TGeRMMU5V/rEf+JbBCEXk5livB /reXZKQMAVS313zEcQ+2kXAdlq4K5D7w9JMk+/uxl7Bn5JBFGSvzld4sEgK1V+OsMMzk qgJziP9+heMEb5bxggkhHetmRNefIqk3SwnpmTMFiKKPVlY54ALp6YBCwwh64Fkk7Sx/ MwgLyFYzlQYLP72QQasZyxzjgf51l5Rj9jExBmJFWBGyJMcYlDsbaDUQe7L80VfTurb0 AD+A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="pG4BuZ/B"; 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 14-20020a05621420ce00b0068fe4f0982fsi9769514qve.156.2024.02.28.03.58.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Feb 2024 03:58:20 -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="pG4BuZ/B"; 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 1rfIZA-0006Ap-Gk; Wed, 28 Feb 2024 06:57:40 -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 1rfIZ6-00069o-C5 for qemu-devel@nongnu.org; Wed, 28 Feb 2024 06:57:36 -0500 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rfIYr-0005oJ-Hz for qemu-devel@nongnu.org; Wed, 28 Feb 2024 06:57:36 -0500 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-33aeb088324so3402905f8f.2 for ; Wed, 28 Feb 2024 03:57:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709121440; x=1709726240; 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=Onyf0n7PQDnbuNd7HujOMaHnjKe5rcDTFcPdFWfXURM=; b=pG4BuZ/Bj1149mqlfTGDl2fS7v6f+3RtH3bKu/cB6TEiyz6enByafnkIz1Sfgy/IPj /d0j42l3v9FwN3om+ZBydejv19kn9T42G7EGF2rQOf7VvOprBjWOeJOniYbVLNhErIVl DJO60CyDiumWxO2ojFq0clP4yeAWT6uRi5tOXer2E7gL80b6VdWEcEWALG8QrC/Da3YP zVW64mDBK6vlsE32Yk9DVtWuuHw1KWsRzZM3wWgfAcjcy12SrZsOXzycHHzXCtP3aJL6 T/YTUtoygoCQDBRxKaXoHV3lXfqO8b6OmepPefrGU/MRlgH2RtpjEoLH/AWKzv6h/eAn WkcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709121440; x=1709726240; 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=Onyf0n7PQDnbuNd7HujOMaHnjKe5rcDTFcPdFWfXURM=; b=iX3r+DKgSYgDyx9s6NP4P/TRcdV36zQoDSdzKj42LycfTNaw7QtApD7zO6nKLzVp3K VRk89ziDqF0dhHzIJrnrmmIPfytpPCNrmtdryCJPKkGrhLxodvg/lmA+mgg6cVZ3Bu3k bhQJMrYFcZfjkM6vECxrbiOFx1y3mitHKZqCqBjyuVnr+FE8dyfGu6giuMPCoiv+9+yG Bw3uq4t6rO0h0cmVE70lqFqZhblk7Hkp1V5JK6IuOLsSVSLd7lhOJvFfpk3zc9THzXyL sdbARr2nVkybNHViBUuyeU295DRL9Kj8toK6IF/eiayCaFARX9Zc+2qW+76XgfUqItSm KRTQ== X-Gm-Message-State: AOJu0YxddWMe2m6aQgREiGXD/cJNarVDUWirIAYQ7oh1lkCnS8xcLO+W 8QS8PVm7tpT24RmfyKSRyv9KeVIHDfdElmt6AmZ83l0CKU1wVPelte5rAJVHGqQ= X-Received: by 2002:a5d:4392:0:b0:33b:8050:291f with SMTP id i18-20020a5d4392000000b0033b8050291fmr8383359wrq.32.1709121439915; Wed, 28 Feb 2024 03:57:19 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id b3-20020a5d4b83000000b0033df1f1dabcsm4516862wrt.90.2024.02.28.03.57.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 03:57:16 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 4FD285F92C; Wed, 28 Feb 2024 11:57:04 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philipp?= =?utf-8?q?e_Mathieu-Daud=C3=A9?= , Alexandre Iooss , Mahmoud Mandour , Pierrick Bouvier Subject: [PULL 25/29] contrib/plugins: fix imatch Date: Wed, 28 Feb 2024 11:56:57 +0000 Message-Id: <20240228115701.1416107-26-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240228115701.1416107-1-alex.bennee@linaro.org> References: <20240228115701.1416107-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x429.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, 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. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Message-Id: <20240227144335.1196131-26-alex.bennee@linaro.org> 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)