Skip to content
Commit cefa94bd authored by Colin Cross's avatar Colin Cross
Browse files

Fix data race and ordering consistency in apex modules

apexDepsMutator can be called on multiple apex modules in parallel,
and then two goroutines could call BuildForApex on the same module
in parallel, leading to a data race appending to apexVariations.
This also results in random ordering of the entries in
apexVariations.

Hold a mutex around appending to apexVariations, and sort it before
passing it to ctx.CreateVariations.

Fixes: 134425751
Test: m nothing
Change-Id: If5a3b53a778daacb3e26ac05cde872cf8eb980b3
parent 06b2c69c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment