Skip to content
Commit d08eca01 authored by Nico Weber's avatar Nico Weber
Browse files

elf: Make error output from AtomSection<ELFT>::write() deterministic.

The function uses parallel_for() and then writes error messages from the
parallel loop's body.  This produces nondetermistic error messages.  Instead,
copy error messages to a vector and sort it by the atom's file offsets before
printing all error messages after the parallel_for().  This results in a few
string copies, but only in the error case.  (And passing tests seem more
important than performance.)

This makes tests elf/AArch64/rel-prel16-overflow.test and
elf/AArch64/rel-prel32-overflow.test pass on Windows: Both tests check that
atom error messages are emitted in a certain order, and on Windows they
happened to be emitted in a different order before this patch.

llvm-svn: 241988
parent 6bc83e0f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment