From patchwork Wed Oct 11 10:33:12 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: 1846516 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=IPl3LF5i; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4S58KV5J2Mz23jd for ; Wed, 11 Oct 2023 21:34:54 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qqWXF-0001WC-JF; Wed, 11 Oct 2023 06:33:49 -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 1qqWX7-0001L9-CD for qemu-devel@nongnu.org; Wed, 11 Oct 2023 06:33:41 -0400 Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qqWX4-0005CX-Bt for qemu-devel@nongnu.org; Wed, 11 Oct 2023 06:33:41 -0400 Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-50435a9f800so8699173e87.2 for ; Wed, 11 Oct 2023 03:33:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697020415; x=1697625215; 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=djhZEY3GVFJ70rgdAPOhClTGynl2JirWDslytlqGvz0=; b=IPl3LF5imUJsZNRn2Ma50Jg4pGQ7CeDHIeBpik8ZOapCJsz/dVtpnRx4h26s0tdQ/n aUr8xI1981WTFEL41uYGWxABpRw4E8qyMzmpvuoNtAVI0i3Opk+aue451OEynA33kLnJ reFPQ9VGgqKHJysszapfcPEhjqS1tywDzRvN6G9NHp6R4KfCm+W0Oo9OMXSuLvzSLPV2 X6yPqPpp88FxzpQmUiC3k/JkiIuKz0yOnWY9udGSwKOfs6R+lvFEe+ecEz/sRtFp9YBB ZB/J+2y8E/sA2eUGXGEnoqsxL50Nml4Hbk3UUk6O9/Sz7FKeIcmTOepMW/mm7ekF26L/ /bfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697020415; x=1697625215; 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=djhZEY3GVFJ70rgdAPOhClTGynl2JirWDslytlqGvz0=; b=oy/fA39E5IltSRTC8xqqoMUMztRMBq209V85hNQ0NqExQBIrc1ORUYMfT6gcsWUuCr oB5e3Ddz86xAal3FKubPKJKglzJQkosGc5SDr7m+yzwYMdGnodtKI/Tqr3+97oa+1LVk 0EgB3swbO7c++sysTqb2VHEDYQG9TBhPjE6B8LdVBv9HxK2GtKywts2fmpALFuAgjyxO +8p5TWpdclRvFJGoFqk1ZMyBk4bUq29U87tVgTmiJuy1qn4bO9lFdjFZKSGeAnE/XdsT aHiBBVuF89QUUgIe/UES19R8ZWnXH7IuMOEUpIJuiEo/W2mxVHiEpZi6eQfVy7GLsxBC 1B3A== X-Gm-Message-State: AOJu0YxdXq35o6IxNUtkU1IQxmNKjfD8eMYSvUb+HTU5Uda0B9X6A4z8 l3tXwG6mWkVo8DXEULlGVlHNjA== X-Google-Smtp-Source: AGHT+IFNINSliDfuL1aE/pKafoZObvwTu7gqLcow+jp2mzWdMlvnB263JC63SR7R11jl9yOrVfYLuA== X-Received: by 2002:a05:6512:2811:b0:503:257a:7f5d with SMTP id cf17-20020a056512281100b00503257a7f5dmr23356290lfb.31.1697020415348; Wed, 11 Oct 2023 03:33:35 -0700 (PDT) Received: from zen.linaroharston ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id l9-20020a1c7909000000b00401b242e2e6sm18678477wme.47.2023.10.11.03.33.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 03:33:32 -0700 (PDT) Received: from zen.linaroharston (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 09FA31FFBC; Wed, 11 Oct 2023 11:33:31 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Akihiko Odaki , =?utf-8?q?Philippe_Mathieu-Dau?= =?utf-8?q?d=C3=A9?= , Alistair Francis , =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PULL 08/25] gdbstub: Fix target_xml initialization Date: Wed, 11 Oct 2023 11:33:12 +0100 Message-Id: <20231011103329.670525-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231011103329.670525-1-alex.bennee@linaro.org> References: <20231011103329.670525-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::12e; envelope-from=alex.bennee@linaro.org; helo=mail-lf1-x12e.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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.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é Reviewed-by: Alistair Francis Message-Id: <20230912224107.29669-2-akihiko.odaki@daynix.com> Signed-off-by: Alex Bennée Message-Id: <20231009164104.369749-9-alex.bennee@linaro.org> diff --git a/gdbstub/system.c b/gdbstub/system.c index 189975b1d6..48976873d2 100644 --- a/gdbstub/system.c +++ b/gdbstub/system.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; }