Update to go1.23.5
This commit is contained in:
@@ -252,6 +252,7 @@ func writebarrier(f *Func) {
|
||||
var start, end int
|
||||
var nonPtrStores int
|
||||
values := b.Values
|
||||
hasMove := false
|
||||
FindSeq:
|
||||
for i := len(values) - 1; i >= 0; i-- {
|
||||
w := values[i]
|
||||
@@ -263,6 +264,9 @@ func writebarrier(f *Func) {
|
||||
end = i + 1
|
||||
}
|
||||
nonPtrStores = 0
|
||||
if w.Op == OpMoveWB {
|
||||
hasMove = true
|
||||
}
|
||||
case OpVarDef, OpVarLive:
|
||||
continue
|
||||
case OpStore:
|
||||
@@ -273,6 +277,17 @@ func writebarrier(f *Func) {
|
||||
if nonPtrStores > 2 {
|
||||
break FindSeq
|
||||
}
|
||||
if hasMove {
|
||||
// We need to ensure that this store happens
|
||||
// before we issue a wbMove, as the wbMove might
|
||||
// use the result of this store as its source.
|
||||
// Even though this store is not write-barrier
|
||||
// eligible, it might nevertheless be the store
|
||||
// of a pointer to the stack, which is then the
|
||||
// source of the move.
|
||||
// See issue 71228.
|
||||
break FindSeq
|
||||
}
|
||||
default:
|
||||
if last == nil {
|
||||
continue
|
||||
|
||||
@@ -662,7 +662,21 @@ func (r *gitRepo) statLocal(ctx context.Context, version, rev string) (*RevInfo,
|
||||
}
|
||||
}
|
||||
}
|
||||
sort.Strings(info.Tags)
|
||||
|
||||
// Git 2.47.1 does not send the tags during shallow clone anymore
|
||||
// (perhaps the exact version that changed behavior is an earlier one),
|
||||
// so we have to also add tags from the refs list we fetched with ls-remote.
|
||||
if refs, err := r.loadRefs(ctx); err == nil {
|
||||
for ref, h := range refs {
|
||||
if h == hash {
|
||||
if tag, found := strings.CutPrefix(ref, "refs/tags/"); found {
|
||||
info.Tags = append(info.Tags, tag)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
slices.Sort(info.Tags)
|
||||
info.Tags = slices.Compact(info.Tags)
|
||||
|
||||
// Used hash as info.Version above.
|
||||
// Use caller's suggested version if it appears in the tag list
|
||||
|
||||
Reference in New Issue
Block a user