From patchwork Wed Jan 3 17:33:45 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: 759646 Delivered-To: patch@linaro.org Received: by 2002:a5d:67c6:0:b0:336:6142:bf13 with SMTP id n6csp6615023wrw; Wed, 3 Jan 2024 09:47:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IEMhoICaqmWjiFhil8b9jd4UBwRRI/yiV5CFnIwkx1v7h7CWuFx3aAIG35WGd1SuFNS2a+F X-Received: by 2002:a05:622a:409:b0:428:31a1:e35b with SMTP id n9-20020a05622a040900b0042831a1e35bmr1941409qtx.60.1704304075761; Wed, 03 Jan 2024 09:47:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704304075; cv=none; d=google.com; s=arc-20160816; b=sxQE3eVjMmtbN7eAsaW6nno1K77Q8LdZbQsYZJSrzJydOX6Xy54GO5+fDlWz22nSzD QVF18HeRbnirR52qgkGe+RJXyPdGb+3gpsxZmu3NLcJL0iz/VyihfDxLr11ipGwQWcPU TW41dhx2DGGA9+k/V901vAyfUReNcAAnwwoWc3+yoJJ61zk02NpaFb+9xymIdjdSNLxg pCdYw9Prbz0V1cPlBSW3b5CVmB80O0vVFfzWd3kohmzEIp2cJlB7mTqRCs4cVwrOlDSi vqwUHhhYcmTuPwo0i4C5XnWF4lthfh5wH5opT737iSVA1RhwAj97zqInQYKHCzY8Lo6f BePA== 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=5s6F1VpUg/LkqHSyTlr7gneXArwgJkl0qAfGr3eFpAs=; b=ZaUVsomtrCgV61AjhvuFmHCJqdynU6m5A0tBSdYNHvutybp28W4BKlW3uh24XiaUq+ W2NfGRA39zUOFKLjWvSC+As39Da9SLr2AlIROs0Vf58+hS2Yt2kIX4zQXUYZzs4wt06a o6PO7gq7v+MqnPh4u4p2R/MHjzUetZuBHk7yfEjSDWhOzmv/18bCEpBCGR18bsOEmYk9 2gFXocCUbVCNhUDdubvVnavVxr4OPoqY8OIBKfCc+NTc9M4aP7plOrlvPMhMhRDzgQvk b0+wnXqnml0uq5FVUdiTMPkmfNVLCxrxfxL6f5BZgmIwvVHr9qrDgWuJxYWgrqYy5gQ3 Me5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=W1qQNInE; 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 v18-20020a05622a145200b004280c8f25c6si10867878qtx.772.2024.01.03.09.47.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 03 Jan 2024 09:47:55 -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=W1qQNInE; 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 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) 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-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) 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) From: =?utf-8?q?Alex_Benn=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_Lureau?= , 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_Benn?= =?utf-8?q?=C3=A9e?= , qemu-arm@nongnu.org, Weiwei Li , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , John Snow , Daniel Henrique Barboza , Nicholas Piggin , Palmer Dabbelt , Marcel Apfelbaum , Ilya Leoshkevich , =?utf-8?q?C=C3=A9dric_Le_Goater?= , "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 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+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 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)