The checkptr instrumentation added in Go 1.14 (https://golang.org/doc/go1.14#compiler) was causing a panic for me in the portaudio package, when building with -race. See the stack trace below. If I'm reading the unsafe.Pointer rules correctly, it seems the issue is with storing the uintptr in a variable, as opposed to doing the arithmetic inline and immediately converting back to an unsafe.Pointer, as I've done in the patch.
The
checkptr
instrumentation added in Go 1.14 (https://golang.org/doc/go1.14#compiler) was causing a panic for me in the portaudio package, when building with-race
. See the stack trace below. If I'm reading the unsafe.Pointer rules correctly, it seems the issue is with storing the uintptr in a variable, as opposed to doing the arithmetic inline and immediately converting back to an unsafe.Pointer, as I've done in the patch.