[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [PATCH 1/1] tools/symbols: fix memory leak in build_initial_tok_table()
- To: Yuanjun Gong <ruc_gongyuanjun@xxxxxxx>
- From: Henry Wang <Henry.Wang@xxxxxxx>
- Date: Wed, 6 Jul 2022 07:30:38 +0000
- Accept-language: zh-CN, en-US
- Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
- Arc-message-signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=r8+WXyd/soauYcseDQOtImG425U3uzMpi+wvqiEpPRg=; b=MnGIL4v1chWq8Y2lE9Wfus91CZUblACVLy4/jEclEO/OwdC4z6feSL4tFzYhpzf7WaBaBGsjV4ferUhN2l2rAqf+RvxBcMIozU/GYY+2UVs4BhpC4KgDfHljunEwoj24RRkC2QwsPJaStczA1t2IY8HukeqjHFZVfw9qKRASvUeXYv2006wEAuODwNfuRjnOhrIZkZ1ArS++pslX2SPIFiSC/0CKBcZfbwdxcDzwKQ/3UWBR0sQFSlUBx7vbQjAkG4x7GKhdZOurXBMSOjewd4bNnFOUhVUzMEXvkIBMmPbtPcs/WNpB0R7Vg+eTdisiGQm4UIILfH7gxXn1HRdtZA==
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=r8+WXyd/soauYcseDQOtImG425U3uzMpi+wvqiEpPRg=; b=BFJCyOZIIEgtMeqcJhdTE05uGg4Wq7KyYIddoxx8ZpCTs8Y9JBeehHQzok/OasroeNO/TbLTaRvnmnxs9hsavkmehAAL90OOk+ve0S1teYjZtMe2i1AYsd6hcng2SrEGLqtIBM0CJkrautHrUNThM+2LgCldTsuzWnEe6057Ius9/XYkvelm31LiVO1TD1TdcnmbGhRuHQr5LCHKAW9TldXbu9XA4K/xbhhGpkhoqRRWp5lZc7hnMPSkxeBh2kRAdZ+cLMoyrffCRxKeIrri+HR1UNJsd04RLeDEDeZ74BH7JGg+U5DTJGeGKcJ9aO9bewKOJ2yyUWOcXteuoJvA6Q==
- Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=iz9I8mQpE16MZ40HUFjlROiH8ATALrkXCu+wA3msSgJf0rC85/fvmF1Wtxk8szwNK2mas1jxx4YxNa4LqIln3vZ+fR7W63BU9iRrQpTx5PKhY8mHu8MH8gmEwDAwGp7oREb2kuQVhxwN0G05fZOZmg8bHwhLQrnEeUw2wUudEfvR1zIWIr6Zfb+BcpjDcp/3uaNtKwBbhl5wJACykhVUBKDhirCfWJiUdYGEIrV/IMAEzKVKaiR3i5Jy0GfFvM1eswtrU1SMzc/0LRj06BS7v0NQAsjOhK3mrVFI/PxcTo0m8tRCzZPqcjFLcPctKs96Jr8Gpfvecr5cmC5QW8LJWw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iUe5iVNxiweeDQ0lQcQIhmgTdo8Z3x/uRzA2Kvdz3vextZRjU0FRie+iCDQDoBaNtWprfJ/wU55I4znJvELhFi0GjIkOms6geVAy3i1VVUyqVoFDDJ7W5UhsA/KilYREH49BuDqaEyqL0gKAVrC9Su6b/t3YrmyPuyvkCt8DpYOs1SQJjkJ+AkgdA5c2quBS9DCC4OZiMx4vEj2+zdW54US6bsEXtyn3DLHBDgJW6CfRK5pNp7C/TaQwLcJoqrEBPgMIjq5YWiVL7v7808wRGzcm0GY1Yaz2DJNUCgcVZGtBkj5+6APkYHeDE4SQ2kjhAIT0yjvoGksXx7hbuS5djg==
- Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>
- Delivery-date: Wed, 06 Jul 2022 07:30:51 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Nodisclaimer: true
- Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Thread-index: AQHYdM1wHtv6Z/xEr0qRtuqMggPoc61xJXTQ
- Thread-topic: [PATCH 1/1] tools/symbols: fix memory leak in build_initial_tok_table()
Hi,
It seems that this patch has been stale for more than a month, with
further actions need to be taken from the author. So I am sending this
email as a gentle reminder. Thanks!
Kind regards,
Henry
> -----Original Message-----
> Subject: Re: [PATCH 1/1] tools/symbols: fix memory leak in
> build_initial_tok_table()
>
> On 31.05.2022 10:23, Yuanjun Gong wrote:
> > Free the table[i].sym field of the invalid sym_entry since
> > it is malloc'ed data.
>
> It would help if you said whether this was just an observation from
> e.g. static code analysis vs you actually having observed the tool
> running out of memory. This is a short-lived process after all, so
> "leaking" memory is not normally much of a problem.
>
> > --- a/xen/tools/symbols.c
> > +++ b/xen/tools/symbols.c
> > @@ -422,6 +422,8 @@ static void build_initial_tok_table(void)
> > table[pos] = table[i];
> > learn_symbol(table[pos].sym, table[pos].len);
> > pos++;
> > + } else {
> > + free(table[i].sym);
>
> Indentation is wrong here.
>
> Jan
>
|