lidavidm opened a new issue, #36669:
URL: https://github.com/apache/arrow/issues/36669

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   If an ArrowSchema etc. has a (garbage) pointer that looks like a Go pointer 
(due to reuse of stack memory/uninitialized memory), that C Data struct is 
passed to Go as an out parameter, and the Go code tries to write a new pointer 
to that value during a GC, the Go GC can get confused and will crash the 
program, probably because we hit this:
   
   > Note: the current implementation has a bug. While Go code is permitted to 
write nil or a C pointer (but not a Go pointer) to C memory, the current 
implementation may sometimes cause a runtime error if the contents of the C 
memory appear to be a Go pointer. Therefore, avoid passing uninitialized C 
memory to Go code if the Go code is going to store pointer values in it. Zero 
out the memory in C before passing it to Go. (https://pkg.go.dev/cmd/cgo)
   
   ### Component(s)
   
   Go


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to