patches for DPDK stable branches
 help / color / mirror / Atom feed
From: David Marchand <>
To: Anatoly Burakov <>
Cc: dev <>, Xueqin Lin <>,
	 Vladimir Medvedkin <>,
	dpdk stable <>
Subject: Re: [PATCH v2 1/1] malloc: fix ASan handling for unmapped memory
Date: Thu, 5 May 2022 11:10:42 +0200
Message-ID: <> (raw)
In-Reply-To: <>

On Wed, May 4, 2022 at 4:32 PM Anatoly Burakov
<> wrote:
> Currently, when we free previously allocated memory, we mark the area as
> "freed" for ASan purposes (flag 0xfd). However, sometimes, freeing a
> malloc element will cause pages to be unmapped from memory and re-backed
> with anonymous memory again. This may cause ASan's "use-after-free"
> error down the line, because the allocator will try to write into
> memory areas recently marked as "freed".
> To fix this, we need to mark the unmapped memory area as "available",
> and fixup surrounding malloc element header/trailers to enable later
> malloc routines to safely write into new malloc elements' headers or
> trailers.

Bugzilla ID: 994
> Fixes: 6cc51b1293ce ("mem: instrument allocator for ASan")
> Cc:

Reported-by: David Marchand <>
> Signed-off-by: Anatoly Burakov <>

It fixes the issues I saw with unit tests.
Applied, thanks for working on this problem.

I'll respin my series that enables ASan in GHA.

David marchand

      reply	other threads:[~2022-05-05  9:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-04 13:40 [PATCH v1 " Anatoly Burakov
2022-05-04 14:31 ` [PATCH v2 " Anatoly Burakov
2022-05-05  9:10   ` David Marchand [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ \
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:

AGPL code for this site: git clone