[lld] [ELF] Parallelize input file loading (PR #191690)

Edd Dawson via llvm-commits llvm-commits at lists.llvm.org
Wed May 6 03:52:11 PDT 2026


playstation-edd wrote:

Hello @MaskRay. I think there's concurrency issue introduced by this PR, regarding `--reproduce`:

* The tasks that form the "body" of  the new `parallelFor` invocation can call `getArchiveMembers()`.
* `getArchiveMembers()` appends thin archive members to `ctx.tar` when `--reproduce` is supplied.
* If multiple thin archives are supplied, concurrent calls to `getArchiveMembers` and therefore `TarWriter::append()` are possible and induce a data race on `TarWriter::Files` (and other, similar issues in the same area).

Mutex protecting use of TarWriter could ensure thread-safety. But something more would be needed for deterministic tar file content.

https://github.com/llvm/llvm-project/pull/191690


More information about the llvm-commits mailing list