From patchwork Mon Oct 9 16:40:47 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: 731009 Delivered-To: patch@linaro.org Received: by 2002:a5d:574c:0:b0:31d:da82:a3b4 with SMTP id q12csp1311550wrw; Mon, 9 Oct 2023 09:44:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF3BVvof+pqkiLQAHGGCueBjOfvIPbHKJVZ1G8W1hEbkiBtF+GpVcwimzBuadsSgmS0T6z2 X-Received: by 2002:a5b:8c6:0:b0:d8b:684d:afd9 with SMTP id w6-20020a5b08c6000000b00d8b684dafd9mr14541168ybq.63.1696869864360; Mon, 09 Oct 2023 09:44:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696869864; cv=none; d=google.com; s=arc-20160816; b=qLkptCc/vr5vBcIaHEmDl6/7F+RWtNMJ1XLm5oOmuS/zJj3VsMf5qcm9z363XsuTk4 Ia2Oo0ynGcNpmqv3k9GRGw/BwI6qa7k1IYjkbiKiHz8VlZVQvJHMuD8u3egfBm1QbFTZ O8bAxyWLHdKSR++KXGVnLrfDRZPXzXGoPLWA0x+hUb/k9HtJKHslv57FAq//u356Wx72 9vFcFRGrJ4Z7a2CRztQ3WUZY/8c34TSrX0BERtfKiXDDJCfg/BjwJkFszilMwsEkhzrR qyfYlalWi5zcQ8FUA2bkLfP21QkIE4XBnrXEtKBB0XfzQkGd3P4ZSEMeD43ckX+BprOH PF5g== 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=kNHX4JyhoYexAQqB9a7CrjUa8yJRKrNW0ix3Ut30RxE=; fh=FL21b9FDJBPKO4Cw1gBqBPIr8gb5CEXpVKTgM6hLIl8=; b=TGnE3824qXH6ILo3YBAo5Sdjnez2ahhWAomy3BBiptApKnOpS1oWqhjEPXvjQvB+y7 ZdjDCwDRb24plyX9aDODhndIddL1oTIh4A1X3OQnRrA5XFaO/LSoXLdBeHMEY+no+gFZ DY1tdP6qh/jUicUwDv0eeCB/4MLDJAXZjC+56djEI/+2qRZduxFVDkiaDMx4KNRoA94E TDQdAoSX1dYXOa/hndjYoig6IbF+pQo8UJUaNsiI9dYCUEhCCHgOLN4ilAE6To7yySPg 074JlTMuxbAGvhqCgucptXmEaM8afd/ca+d6OCfqRe/lipYTlX9VB4KEaYI2+YH423Ua ZQAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Td5guE2R; 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 z3-20020a0cda83000000b0065af0cfad9csi6370054qvj.44.2023.10.09.09.44.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Oct 2023 09:44:24 -0700 (PDT) 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=Td5guE2R; 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 1qptM4-0001Iz-Og; Mon, 09 Oct 2023 12:43:40 -0400 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 1qptJy-0005KE-9F for qemu-devel@nongnu.org; Mon, 09 Oct 2023 12:41:35 -0400 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 1qptJg-0001Wr-As for qemu-devel@nongnu.org; Mon, 09 Oct 2023 12:41:28 -0400 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-317c3ac7339so4333097f8f.0 for ; Mon, 09 Oct 2023 09:41:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696869670; x=1697474470; 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=kNHX4JyhoYexAQqB9a7CrjUa8yJRKrNW0ix3Ut30RxE=; b=Td5guE2RPTMNdyZTQzZUcI77K5oCS1CwjUIA7yICrXN2HJqRdEzSZBLsE4HWTw2xbd Y/NX9X5jUJXURijIVTdrROB9O2e98JbwvSxTS4lTJ5aDOoa+fwV0h+9JjHeVUzZBxGXT v93E8QLzKm9rynwuT2mt+nkmXQouYgq7y5u1t4Hq9JAsvB4vl1WHJJQeF4wpZOi1ywSk xhF7L9uNJ5UPF/CzNG5LOvl8ksGFLg1oWeKF6jwSlRsPhpX+/taurfHM8JzJHoOUjFSE lF4+1X1z17fJRDh6QKQ45PiR5WxeR26WGtvlzYcv/3uDHD69SH0NnARr05DtsB5i0ElR npew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696869670; x=1697474470; 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=kNHX4JyhoYexAQqB9a7CrjUa8yJRKrNW0ix3Ut30RxE=; b=u51i+UC7e6IXWeCWU6xzVK5AnvcubeR+hw86KHk5YZsWxbK9QPeLUJEhs1emcZidLE YexPeb/tGLRDAdyrjR67UruUu5IrROhR6RHJ547ivI4h8CB3SI+JDSH0PGRylikC3gTH SMEGLETDFV3wrHpHCyV8YMIIe8c6AH98qNHxDbw6ED39z47yEUeG4x5aF8lXOPshvb0U yQVEbZzbl7CmxYYyUiz9K5QlwTTf3dyOH7ghnZ/ICOQzxFAf//Sag3P3VDd/U3FQ3ypZ qJ4gZJo+Ar3e52tNxJrMTm0ICQvYg3dg9+SKxD5KkbeOLnYhiaq13UJExljOGvTrBKI9 39NQ== X-Gm-Message-State: AOJu0YwWkObD/WkFMIT2Vrg3RHaTsxs2uqwyrEwg96mNlkjuCjm1fMVj 84gmFo1Ea3OYDN295HDQD1WlfQ== X-Received: by 2002:a05:6000:12cd:b0:320:976:f942 with SMTP id l13-20020a05600012cd00b003200976f942mr14088178wrx.7.1696869670278; Mon, 09 Oct 2023 09:41:10 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id d12-20020a5d538c000000b0032769103ae9sm10094218wrv.69.2023.10.09.09.41.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 09:41:07 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 13F561FFBB; Mon, 9 Oct 2023 17:41:06 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Xiaojuan Yang , =?utf-8?q?C=C3=A9dric_Le_Goater?= , =?utf-8?q?Alex_Benn=C3=A9?= =?utf-8?q?e?= , Bastian Koppelmann , Brad Smith , Radoslaw Biernacki , David Hildenbrand , Cleber Rosa , Ilya Leoshkevich , qemu-riscv@nongnu.org, Daniel Henrique Barboza , Alexandre Iooss , Nicholas Piggin , Bin Meng , Leif Lindholm , Paolo Bonzini , Eduardo Habkost , Alistair Francis , qemu-ppc@nongnu.org, John Snow , Liu Zhiwei , qemu-arm@nongnu.org, Wainer dos Santos Moschetta , Palmer Dabbelt , Peter Maydell , Yanan Wang , Weiwei Li , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Marcel Apfelbaum , Beraldo Leal , Yoshinori Sato , Mahmoud Mandour , Richard Henderson , Song Gao , Marcin Juszkiewicz , qemu-s390x@nongnu.org, =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Akihiko Odaki Subject: [PATCH 08/25] gdbstub: Fix target_xml initialization Date: Mon, 9 Oct 2023 17:40:47 +0100 Message-Id: <20231009164104.369749-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231009164104.369749-1-alex.bennee@linaro.org> References: <20231009164104.369749-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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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 From: Akihiko Odaki target_xml is no longer a fixed-length array but a pointer to a variable-length memory. Fixes: 56e534bd11 ("gdbstub: refactor get_feature_xml") Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230912224107.29669-2-akihiko.odaki@daynix.com> Signed-off-by: Alex Bennée Reviewed-by: Alistair Francis --- gdbstub/softmmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdbstub/softmmu.c b/gdbstub/softmmu.c index 9f0b8b5497..42645d2220 100644 --- a/gdbstub/softmmu.c +++ b/gdbstub/softmmu.c @@ -292,7 +292,7 @@ static int find_cpu_clusters(Object *child, void *opaque) assert(cluster->cluster_id != UINT32_MAX); process->pid = cluster->cluster_id + 1; process->attached = false; - process->target_xml[0] = '\0'; + process->target_xml = NULL; return 0; }