From patchwork Fri Feb 23 16:21:58 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: 775158 Delivered-To: patch@linaro.org Received: by 2002:adf:a356:0:b0:33b:4db1:f5b3 with SMTP id d22csp439143wrb; Fri, 23 Feb 2024 08:47:08 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXcar4J0jox5gEV9XoqWzq3aQk73PP0vpN/5QWpOZ1VjYfxON68qHLeDBHhZjzEp87ku6LQPG3qAUTEoGn0X4bV X-Google-Smtp-Source: AGHT+IEsmYkjoN0ZwdEmwDDYlCCTBUkO78u2Wm4NY7ng4Ko7V7SKDawTgmBZx9xcpPCc2awumT4y X-Received: by 2002:a05:620a:444f:b0:787:9863:eb6f with SMTP id w15-20020a05620a444f00b007879863eb6fmr493264qkp.9.1708706827855; Fri, 23 Feb 2024 08:47:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708706827; cv=none; d=google.com; s=arc-20160816; b=afLxWZGEtb1IefssPrU33WbTskS3OFJlH3I7yp2z4ZUT7JkBbnO+53o1DFtRt9svw8 2de+8Da8nWn//trB4Vl0zXA8kyu2kJsISLysBz1IO7OhqrkNHVG0X5fU6Gk8+zOCCGzq 9jsnS6Xy+4B9vOk+sFUwl1/qoEOU3UxpBrOO2JmxvkDnocSq13sUmRqPEhPw/F379t8g x6/+DC/8v48ijdssCIuTPgQebxuNwaAXWR/qdrgBMImS7oJTTyYhMMb/Ogi0k2gTz3zT AkaHaEVlAeW4GZ9qYGOFpgWSX4012PzeOTfXwiCZ2xEwI3kFo1hVuOLXY7JVByUPkboK GDcA== 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=eZ1nEd8NJNCNQAO45v/M0dXLXOT0Wd7jVxF+jov+Saw=; fh=/YEu+IjZM84YWRDAuPeJeqMoLNTdSzM/iYv/jybOCWk=; b=E9RJ4Ea6XPJJLJwkcIP+FBNsnLBMNo2ZA0XoRd1Q0k7/OUFDB9b+J5ed0V/2eNjjT1 STDOuxhg8vkwUeVytH5IfLJaHd3/fl5u2Ds8FH6XYG4BIlHEobS8vOx/4v04xfm9jvnh 6dcaDDNsENI+Mgk2PiLC9kspPmFKcxKjZFtv7ZNsq1yKI/9NZlNHfjexY3ZqZfiVVvVx CrPLpeBcIltdupIfj23xIXtriWvrhtCDaja6J49vSyznMN/gQGG31rrUBnD+eobUAItq sw8afl1gIgLfKWxbLAirP1JDj9fWgxwfxDTgVHWTW6t+kHvCp+qJiHWgGVZh06Ujb8PN zzYA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yKn5FcBQ; 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 ee26-20020a05620a801a00b00787b34a1448si1565304qkb.158.2024.02.23.08.47.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 23 Feb 2024 08:47:07 -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=yKn5FcBQ; 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 1rdYhU-0006Og-Sf; Fri, 23 Feb 2024 11:47:04 -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 1rdYQU-00064m-OT for qemu-devel@nongnu.org; Fri, 23 Feb 2024 11:29:31 -0500 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rdYQ3-0007IQ-J3 for qemu-devel@nongnu.org; Fri, 23 Feb 2024 11:29:28 -0500 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-33d36736d4eso399950f8f.1 for ; Fri, 23 Feb 2024 08:28:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708705734; x=1709310534; 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=yKn5FcBQCRN/OpHpz80dhP9+jk7/ojGub8BfV/rLd8ovcp4NyG5JL10QwzwoLcEKPJ FrE0n2DjY6YzOkdO01P0B+DMg3F5Nw5UFlygWImzP2m0BhEsOy6n11OIqWUI5couFjgr pgXoeFx0IUt+vG1OXiZ9YYhcJ12LHBVhjvjeBLxc0nvQyxeNOmeCvOK7aD4CoSS8tGFR 726NI3HpoDSOwUpCe57WbZUXy7whwyrYn9pNFkumeAfwCZopoyMtrgrAYIxqDiBTJo5x 0eZCDRU0805sCOHV2PL0zQx8x+gKbTruYBEsb2py+9OLMJAt0dinmQONWMOuWQ7bPMrF 6Geg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708705734; x=1709310534; 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=vkuNcmuiWzw7PHpxHZtiYp+8fO+grEEPjMbjuAkoxXmsQdgceR+MNYgI9mRQ2jujFd nAGVHcYIXPnu2Feu0cs8i0uS89FjmjWOsD+WQN5BLcXwFbusSIX+pht1+g19VAW+6yoT oj5bEvO7tZy7rzLMuKrg2/OK44PaIj6bOggDWbLkh4511iUBoXzkpX6ZHZssArsfFnM6 2ycIvrgsuUy2bnioJ6yv65NVWzmiORXYCRHDo7o+c6Wj19L8rVf6MW4rwc5TPfbrbjH+ Zh9Wc0UQXEcetGvek2E/4j1qkrz9ZH7un2kaC/93DtC967bEdT9CkbwSOISgjZ9lcKtD M/mQ== X-Gm-Message-State: AOJu0YxP5fI99QZTuB3J/IKldK6gQoFTcU+MJTinFglE0Et39wMIUI90 3yUASf7fOsJuB/Q++N2iJsYc/FdSeZ0avRyt3iSkUQJmak6uyun5aueiPehdDTM= X-Received: by 2002:a5d:64c9:0:b0:33d:3ff4:1047 with SMTP id f9-20020a5d64c9000000b0033d3ff41047mr234085wri.58.1708705734493; Fri, 23 Feb 2024 08:28:54 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id f11-20020adfe90b000000b0033b43a5f53csm3297803wrm.103.2024.02.23.08.28.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 08:28:52 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id AF2685F939; Fri, 23 Feb 2024 16:22:04 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Song Gao , qemu-s390x@nongnu.org, Liu Zhiwei , Pierrick Bouvier , Thomas Huth , Daniel Henrique Barboza , Bin Meng , Yanan Wang , Laurent Vivier , qemu-ppc@nongnu.org, David Hildenbrand , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Ilya Leoshkevich , Cleber Rosa , Nicholas Piggin , Marcel Apfelbaum , Eduardo Habkost , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= , Alexandre Iooss , Peter Maydell , =?utf-8?q?Alex_Benn=C3=A9e?= , Daniel Henrique Barboza , qemu-arm@nongnu.org, qemu-riscv@nongnu.org, Palmer Dabbelt , Mahmoud Mandour , John Snow , Weiwei Li , Alistair Francis , Yoshinori Sato , Brian Cain , Paolo Bonzini , "Edgar E. Iglesias" , Michael Rolnik Subject: [PATCH v2 23/27] contrib/plugins: fix imatch Date: Fri, 23 Feb 2024 16:21:58 +0000 Message-Id: <20240223162202.1936541-24-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240223162202.1936541-1-alex.bennee@linaro.org> References: <20240223162202.1936541-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x433.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. 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)