Re: [PATCH v2 1/1] malloc: fix ASan handling for unmapped memory

2022-05-05 Thread David Marchand
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 memo

[PATCH v2 1/1] malloc: fix ASan handling for unmapped memory

2022-05-04 Thread Anatoly Burakov
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 l