mirror of
https://github.com/golang/go
synced 2024-11-17 02:34:46 -07:00
runtime: don't mark unrolled bitmap type as having a gc program
It doesn't have a GC program - the whole point is that it is the unrolled version of a GC program. Fortunately, this isn't a bug as (*mspan).typePointersOfUnchecked ignores the GCProg flag and just uses GCData as a bitmap unconditionally. Change-Id: I2508af85af4a1806946e54c893120c5cc0cc3da3 Reviewed-on: https://go-review.googlesource.com/c/go/+/555355 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Knyszek <mknyszek@google.com> Reviewed-by: Keith Randall <khr@google.com>
This commit is contained in:
parent
e9b3ff15f4
commit
ee4b61a32e
@ -883,12 +883,11 @@ func heapSetType(x, dataSize uintptr, typ *_type, header **_type, span *mspan) (
|
||||
// We only need to write size, PtrBytes, and GCData, since that's all
|
||||
// the GC cares about.
|
||||
gctyp = (*_type)(unsafe.Pointer(progSpan.base()))
|
||||
gctyp.Kind_ |= kindGCProg
|
||||
gctyp.Size_ = typ.Size_
|
||||
gctyp.PtrBytes = typ.PtrBytes
|
||||
gctyp.GCData = (*byte)(add(unsafe.Pointer(progSpan.base()), heapBitsOff))
|
||||
|
||||
// Expand the GC program into space reserved at the end of the object.
|
||||
// Expand the GC program into space reserved at the end of the new span.
|
||||
runGCProg(addb(typ.GCData, 4), gctyp.GCData)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user