aboutsummaryrefslogtreecommitdiff
path: root/src/errors/errors.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2023-05-25 00:21:13 -0400
committerRuss Cox <rsc@golang.org>2023-05-25 13:00:06 +0000
commit055c186f53493da473c888869ad468861ba25f1a (patch)
tree6b3e6e18058a18b2dc5a2018bd7adfacaba89c15 /src/errors/errors.go
parent6f7824f7a4d62998b03f3ddc5c12938a9a247e85 (diff)
downloadgo-055c186f53493da473c888869ad468861ba25f1a.tar.xz
runtime: add heapObjectsCanMove
heapObjectsCanMove is always false in the current garbage collector. It exists for go4.org/unsafe/assume-no-moving-gc, which is an unfortunate idea that had an even more unfortunate implementation. Every time a new Go release happened, the package stopped building, and the authors had to add a new file with a new //go:build line, and then the entire ecosystem of packages with that as a dependency had to explicitly update to the new version. Many packages depend on assume-no-moving-gc transitively, through paths like inet.af/netaddr -> go4.org/intern -> assume-no-moving-gc. This was causing a significant amount of friction around each new release, so we added this bool for the package to //go:linkname instead. The bool is still unfortunate, but it's not as bad as breaking the ecosystem on every new release. If the Go garbage collector ever does move heap objects, we can set this to true to break all the programs using assume-no-moving-gc. Change-Id: I06c32bf6ccc4601c8eef741d7382b678aada3508 Reviewed-on: https://go-review.googlesource.com/c/go/+/498121 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com>
Diffstat (limited to 'src/errors/errors.go')
0 files changed, 0 insertions, 0 deletions