[PATCH] D120073: [LLD] Fix for race condition.
Alexander Yermolovich via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 17 10:30:52 PST 2022
ayermolo added a comment.
In D120073#3330235 <https://reviews.llvm.org/D120073#3330235>, @MaskRay wrote:
> This will harm performance. If only `elf::getErrorPlace` is problematic, we can add a mutex there.
>
>> There is a potential race condition when getErrPlace is invoked in multithreaded context
>
> How?
Well problem fundamentally in uncompress. It already has a mutex. Which tells to me there was some thought that was put into making it multi threading safe, but check is not complete, as it doesn't handle uncompressedSize/rawData pointer.
As for how. Eh... There is some internal code I inherited that exposes this issue, and zlib error hid the real error of relocation overflow.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120073/new/
https://reviews.llvm.org/D120073
More information about the llvm-commits
mailing list