HomePhabricator

[hwasan] Fix Thread reuse (try 2).

Authored by eugenis on Nov 12 2020, 3:14 PM.

Description

[hwasan] Fix Thread reuse (try 2).

HwasanThreadList::DontNeedThread clobbers Thread::next_,
Breaking the freelist. As a result, only the top of the freelist ever
gets reused, and the rest of it is lost.

Since the Thread object with its associated ring buffer is only 8Kb, this is
typically only noticable in long running processes, such as fuzzers.

Fix the problem by switching from an intrusive linked list to a vector.

Differential Revision: https://reviews.llvm.org/D91392

Details

Committed
eugenisNov 18 2020, 4:04 PM
Differential Revision
D91392: [hwasan] Fix Thread reuse (try 2).
Parents
rG67f16e9e91f2: [NPM] Remove -enable-npm-optnone flag
Branches
Unknown
Tags
Unknown