Update to go1.23.5

This commit is contained in:
Vorapol Rinsatitnon
2025-01-26 14:10:14 +08:00
parent bd5ec5d0e7
commit 716e5b5d05
14 changed files with 264 additions and 131 deletions

View File

@@ -53,3 +53,28 @@ func combine4slice(p *[4][]byte, a, b, c, d []byte) {
// arm64:-`.*runtime[.]gcWriteBarrier`
p[3] = d
}
type S struct {
a, b string
c *int
}
var g1, g2 *int
func issue71228(dst *S, ptr *int) {
// Make sure that the non-write-barrier write.
// "sp.c = ptr" happens before the large write
// barrier "*dst = *sp". We approximate testing
// that by ensuring that two global variable write
// barriers aren't combined.
_ = *dst
var s S
sp := &s
//amd64:`.*runtime[.]gcWriteBarrier1`
g1 = nil
sp.c = ptr // outside of any write barrier
//amd64:`.*runtime[.]gcWriteBarrier1`
g2 = nil
//amd64:`.*runtime[.]wbMove`
*dst = *sp
}