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
Loading
Please register or sign in to comment