diff options
| author | MichaĆ Chojnowski <michal.chojnowski@scylladb.com> | 2022-07-07 13:54:51 +0300 |
|---|---|---|
| committer | Vladislav Khmelevsky <och95@yandex.ru> | 2022-07-07 14:27:29 +0300 |
| commit | bd301a418bf2a866c7c17a5cdc82a1d7d13e156f (patch) | |
| tree | b143e5626daf91818d581d8ff210000636f6cd02 /lldb/packages/Python/lldbsuite/test/lldbdwarf.py | |
| parent | 8e03bfc368f72a4f97129b0837396e69ae2ba1fe (diff) | |
| download | llvm-bd301a418bf2a866c7c17a5cdc82a1d7d13e156f.zip llvm-bd301a418bf2a866c7c17a5cdc82a1d7d13e156f.tar.gz llvm-bd301a418bf2a866c7c17a5cdc82a1d7d13e156f.tar.bz2 | |
[BOLT] Fix concurrent hash table modification in the instrumentation runtime
`__bolt_instr_data_dump()` does not lock the hash tables when iterating
over them, so the iteration can happen concurrently with a modification
done in another thread, when the table is in an inconsistent state. This
also has been observed in practice, when it caused a segmentation fault.
We fix this by locking hash tables during iteration. This is done by taking
the lock in `forEachElement()`.
The only other site of iteration, `resetCounters()`, has been correctly
locking the table even before this patch. This patch removes its `Lock`
because the lock is now taken in the inner `forEachElement()`.
Reviewed By: maksfb, yota9
Differential Revision: https://reviews.llvm.org/D129089
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/lldbdwarf.py')
0 files changed, 0 insertions, 0 deletions
