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
package p
import "unsafe"
type P unsafe.Pointer
func f(p P) *int { return (*int)(p) }
func g(p P) P { return P(uintptr(p) + 1) }
This is because the runtime functions have unsafe.Pointer parameters, but currently when inserting instrumentation, we pass the unsafe pointers as-is (i.e., as P-typed above, which isn't assignable to unsafe.Pointer).
Fix is to just add appropriate explicit conversions in the instrumentation.
This package fails to compile with
-d=checkptr
:This is because the runtime functions have
unsafe.Pointer
parameters, but currently when inserting instrumentation, we pass the unsafe pointers as-is (i.e., asP
-typed above, which isn't assignable tounsafe.Pointer
).Fix is to just add appropriate explicit conversions in the instrumentation.
Reported by Asif Jalil on golang-dev.
The text was updated successfully, but these errors were encountered: