[scudo][standalone] Fix a race in the secondary release
Summary: I tried to move the `madvise` calls outside of one of the secondary mutexes, but this backfired. There is situation when a low release interval is set combined with secondary pressure that leads to a race: a thread can get a block from the cache, while another thread is `madvise`'ing that block, resulting in a null header. I changed the secondary race test so that this situation would be triggered, and moved the release into the cache mutex scope. Reviewers: cferris, pcc, eugenis, hctim, morehouse Subscribers: jfb, #sanitizers, llvm-commits Tags: #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D74072
Loading
Please sign in to comment