Skip to content

Commit 2f74ebf

Browse files
committed
gocore: update for Go1.17
1 parent 51b4741 commit 2f74ebf

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

internal/gocore/gocore_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -274,4 +274,5 @@ func TestVersions(t *testing.T) {
274274
loadExampleVersion(t, "1.13.3.zip")
275275
loadExampleVersion(t, "1.14.zip")
276276
loadExampleVersion(t, "1.16.zip")
277+
loadExampleVersion(t, "1.17.zip")
277278
}

internal/gocore/process.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,10 @@ func (p *Process) readSpans(mheap region, arenas []arena) {
333333
panic("weird mapping " + m.Perm().String())
334334
}
335335
}
336-
if mheap.HasField("curArena") { // go1.13.3 and up
336+
if p.minorVersion < 17 && mheap.HasField("curArena") {
337+
// go1.13.3 and up has curArena.
338+
// In Go 1.17, we ... don't need to do this any longer. See patch
339+
// bd6aeca9686d5e672ffda1ea0cfeac7a3e7a20a4
337340
// Subtract from the heap unallocated space
338341
// in the current arena.
339342
ca := mheap.Field("curArena")

internal/gocore/testdata/1.17.zip

736 KB
Binary file not shown.

0 commit comments

Comments
 (0)