1
0
mirror of https://github.com/golang/go synced 2024-11-19 23:04:40 -07:00
go/misc/cgo/errors
Ian Lance Taylor 4b3a3bd3aa runtime: don't issue cgocheck error for timer bucket source pointer
The cgo checker was issuing an error with cgocheck=2 when a timer
bucket was stored in a pollDesc. The pollDesc values are allocated
using persistentalloc, so they are not in the Go heap. The code is OK
since timer bucket pointers point into a global array, and as such are
never garbage collected or moved.

Mark timersBucket notinheap to avoid the problem. timersBucket values
only occur in the global timers array.

Fixes #23435

Change-Id: I835f31caafd54cdacc692db5989de63bb49e7697
Reviewed-on: https://go-review.googlesource.com/87637
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-01-15 22:18:55 +00:00
..
src misc/cgo/errors: test that the Go rune type is not identical to C.int 2017-09-14 02:24:39 +00:00
errors_test.go cmd/compile: record original and absolute file names for line directives 2017-11-13 16:47:41 +00:00
ptr_test.go runtime: don't issue cgocheck error for timer bucket source pointer 2018-01-15 22:18:55 +00:00