aboutsummaryrefslogtreecommitdiff
path: root/src/database/sql
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2023-06-12 22:56:23 -0400
committerGopher Robot <gobot@golang.org>2023-06-13 18:59:19 +0000
commitccf75b36ff884c5a6839be143dd4366824c85aca (patch)
tree90fff100c3b0b561db98b1eadb0911fd4cfb691c /src/database/sql
parent8b5ed3cdaeba621687c71c19174bb4db0f5713f0 (diff)
downloadgo-ccf75b36ff884c5a6839be143dd4366824c85aca.tar.xz
cmd/internal/obj: make aix/ppc64 builds reproducible
sort.Slice was being used to sort some newly added entries by name to make the ctxt.Data slice reproducible, but some existing entries have the same name, and the effect was to take the non-determinism of the tail entries and scatter it into the earlier, deterministic section when multiple entries had the same name. The specific entries with the same name are type SDWARFVAR, which all have an empty name but different relocations. If they are shuffled, then the relocation symbols are visited in a different order, which enters them into the string table in a different order, which results in different object files, different object file hashes, and different build IDs for the final executables. Use sort.SliceStable to avoid reordering entries we don't mean to reorder. Also add a simple test for scheduling-related non-determinism. I debugged this originally using 'go install -race cmd/compile', but that was slow and turned out not to be terribly reliable. Using a few different GOMAXPROCS settings turns out to be a much more effective (and faster) way to scramble scheduling decisions. Fixes #60759. Change-Id: Ia966b02b9fdaefa971f998a09319ca375bdf8604 Reviewed-on: https://go-review.googlesource.com/c/go/+/502755 Reviewed-by: Than McIntosh <thanm@google.com> Reviewed-by: Heschi Kreinick <heschi@google.com> Auto-Submit: Russ Cox <rsc@golang.org> TryBot-Bypass: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Bryan Mills <bcmills@google.com> Reviewed-by: Cherry Mui <cherryyz@google.com>
Diffstat (limited to 'src/database/sql')
0 files changed, 0 insertions, 0 deletions