[all-commits] [llvm/llvm-project] 523cc0: [hwasan] Fix Thread reuse (try 2).
Evgenii Stepanov via All-commits
all-commits at lists.llvm.org
Wed Nov 18 16:04:36 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 523cc097fdafa1bb60373dcc70df7dfd31551f56
https://github.com/llvm/llvm-project/commit/523cc097fdafa1bb60373dcc70df7dfd31551f56
Author: Evgenii Stepanov <eugenis at google.com>
Date: 2020-11-18 (Wed, 18 Nov 2020)
Changed paths:
M compiler-rt/lib/hwasan/hwasan_thread.h
M compiler-rt/lib/hwasan/hwasan_thread_list.h
A compiler-rt/test/hwasan/TestCases/Linux/reuse-threads.cpp
M compiler-rt/test/hwasan/TestCases/thread-uaf.c
Log Message:
-----------
[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
More information about the All-commits
mailing list