From nobody Mon Nov 25 02:07:40 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1719400080; cv=none; d=zohomail.com; s=zohoarc; b=O3sszkr8Y8rNNzEnxWJbGXjEqTU1BmBgQKcCcdkhy7golm//Zc+yPeRqgKr5dHWTMB+vWeLoVkuNEsDuINitbLLz2fUHe6dMORN6WCyNAPP6+357Pf9gvwf4E1aaenT4WwxUNYIaUTGMT67tCRRblIgeiTAZjbXqspQS9TtXrCo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1719400080; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=8gdrJSUaYQob8d/4ZxzgiF7J5n5fiKZWcn18f0CmUEY=; b=HOOEV3edkXgu+abCBjlYfYos9l4i+v26sDTBMchweqOBXctLRnKeIAhWMOy+Tjv83VcICoOodh80ir0fs6wOGum4xVo74QPVr/9RYF3Y1mp/r04tCwGmNQIRit9KroSshiIKgCRdAZTDiDhLcHN50jtzk/WvNkbMRhEuHFHifZc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1719400080890718.6956217194858; Wed, 26 Jun 2024 04:08:00 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sMQUE-0005JA-Nn; Wed, 26 Jun 2024 07:06:50 -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 1sMQUD-0005IR-4f for qemu-devel@nongnu.org; Wed, 26 Jun 2024 07:06:49 -0400 Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sMQUA-0004ee-KT for qemu-devel@nongnu.org; Wed, 26 Jun 2024 07:06:48 -0400 Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-7024d571d8eso5109912b3a.0 for ; Wed, 26 Jun 2024 04:06:46 -0700 (PDT) Received: from localhost ([157.82.204.135]) by smtp.gmail.com with UTF8SMTPSA id d9443c01a7336-1f9eb4ea7dbsm97876115ad.213.2024.06.26.04.06.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 26 Jun 2024 04:06:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20230601.gappssmtp.com; s=20230601; t=1719400005; x=1720004805; darn=nongnu.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=8gdrJSUaYQob8d/4ZxzgiF7J5n5fiKZWcn18f0CmUEY=; b=SCdPH9CMBhbehc8wnektX4X8oRmrwHenjJEZcZxUzGiTBUHwjFrtYE7P2NFEAI54t8 dHU6ybS4HWchqGi7O9S0k9QP2Sypv5TPryRDIjftAyjTJFy59s2yUgR/Fb7drFvHzL2y elA7igDCBAkdGfCnu/ndsF939H/6EkityYAuCi3nbdArPnZOgp6NQX3RCUAEL/KXuKc7 5cu768X4yq+mGLVSuKbGHBOiu1lMxFsqGj+YNOi/8bVdaJk11m/Dqj5fu6pvFG8ttUkT qs3hCe+WJpTfDKEfzRZiaNmNTb/AYRxlMHVeYddN7di8cq5BBmv3mkfs88QHtvHIO7+q u2aA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719400005; x=1720004805; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8gdrJSUaYQob8d/4ZxzgiF7J5n5fiKZWcn18f0CmUEY=; b=hWTE1qHw3JrshddahxZ4Zv+Ti5fdJTto2eKD5XaTxUQuqePPqFQmR84wwNpCJDSK07 sNA+hvCfuG/AIhIZl63rD4L7EzWR3AT4xMQMiRnJ9wFBfnajKDztTnURsFe+1OeQNSW8 F3lGWvLLW0NYN3Tx7l7wIJSfqLwPk3s0dOyhTG7B/IMM3DRiYW6QjOy5sp3R3Zs628oW xBkNFJcmej05eAHa6dt7f0F16ngJ5uDLKHiSQYVhTgQRS08G2RaDVXLWqEnorFTA746j NY4tGKYdoyonMn8f7tqMpWVfbiQ5Gs9kBCx3rl7/mb/p9eaJI7sHyC2TaKPFr2GOFpWc XhWA== X-Gm-Message-State: AOJu0YznRork4p3PrcNsdBnkipPL+hZpsrsRFl3Dc2WOOOJByUMrM4Cs 6h4NjfGuglykYHjFsuHn4aAqsvJYLBJ6pEVOzHvAcXA5E3I4P9nBbx9MeN54sws= X-Google-Smtp-Source: AGHT+IEm0Uk3jhijPGftXQo5d28gVdFOecDw4w56VU5pdI4g1PPkbbhI7q/sn3Q44Xj+9R245m8MMA== X-Received: by 2002:a05:6a20:1a96:b0:1be:c4bb:6f33 with SMTP id adf61e73a8af0-1bec4bb7008mr517626637.12.1719400005215; Wed, 26 Jun 2024 04:06:45 -0700 (PDT) From: Akihiko Odaki Date: Wed, 26 Jun 2024 20:06:24 +0900 Subject: [PATCH 01/14] hw/core: Free CPUState allocations MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20240626-san-v1-1-f3cc42302189@daynix.com> References: <20240626-san-v1-0-f3cc42302189@daynix.com> In-Reply-To: <20240626-san-v1-0-f3cc42302189@daynix.com> To: Eduardo Habkost , Marcel Apfelbaum , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Yanan Wang , John Snow , BALATON Zoltan , Jiaxun Yang , Nicholas Piggin , Daniel Henrique Barboza , David Gibson , Harsh Prateek Bora , Alexey Kardashevskiy , "Michael S. Tsirkin" , =?utf-8?q?Alex_Benn=C3=A9e?= , Peter Xu , Fabiano Rosas , Paolo Bonzini , David Hildenbrand , Thomas Huth , Laurent Vivier Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org, qemu-ppc@nongnu.org, Akihiko Odaki X-Mailer: b4 0.14-dev-fd6e3 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: none client-ip=2607:f8b0:4864:20::435; envelope-from=akihiko.odaki@daynix.com; helo=mail-pf1-x435.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @daynix-com.20230601.gappssmtp.com) X-ZM-MESSAGEID: 1719400081749100001 This suppresses LeakSanitizer warnings. Signed-off-by: Akihiko Odaki --- hw/core/cpu-common.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/core/cpu-common.c b/hw/core/cpu-common.c index 0f0a247f5642..42f38b01a97f 100644 --- a/hw/core/cpu-common.c +++ b/hw/core/cpu-common.c @@ -274,6 +274,9 @@ static void cpu_common_finalize(Object *obj) { CPUState *cpu =3D CPU(obj); =20 + g_free(cpu->thread); + g_free(cpu->halt_cond); + g_free(cpu->cpu_ases); g_array_free(cpu->gdb_regs, TRUE); qemu_lockcnt_destroy(&cpu->in_ioctl_lock); qemu_mutex_destroy(&cpu->work_mutex); --=20 2.45.2