You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cmd/compile: C.malloc fails with -d=checkptr #34968
cgo depends on the ability to take the address of its parameters on the stack, and know that they'll all be contiguous there. But CL 201781 caused them to start being heap allocated because of the unsafe.Pointer(&p0) conversion.
Easy fix is to make //go:cgo_unsafe_args imply //go:nocheckptr so that this behavior is disabled.
Activity
mdempsky commentedon Oct 17, 2019
Looks like checkptr instrumentation needs to be skipped for
//go:cgo_unsafe_argsfunctions.mdempsky commentedon Oct 17, 2019
Ah, it's because of CL 201781.
cgo depends on the ability to take the address of its parameters on the stack, and know that they'll all be contiguous there. But CL 201781 caused them to start being heap allocated because of the
unsafe.Pointer(&p0)conversion.Easy fix is to make
//go:cgo_unsafe_argsimply//go:nocheckptrso that this behavior is disabled.gopherbot commentedon Oct 17, 2019
Change https://golang.org/cl/201823 mentions this issue:
cmd/compile: disable checkptr for //go:cgo_unsafe_args functions