zeroshade commented on issue #405:
URL: https://github.com/apache/arrow-go/issues/405#issuecomment-2981783953

   Even if the pointer to the struct is being passed in to be populated? 
(https://github.com/apache/arrow-rs/blob/3837ac01dcc25ded91bd1e42221f3a9396051841/arrow-integration-testing/src/lib.rs#L182).
 I'm looking at the runner and seeing 
(https://github.com/apache/arrow/blob/main/dev/archery/archery/integration/runner.py#L501)
 that it doesn't memset the C structs to zero them out before passing them into 
the exporter. 
   
   So there's only two scenarios I can think of:
   
   * Somehow a pointer being produced by Rust looks like a Go memory pointer 
(is this as unlikely as it seems to me?)
   * The struct is uninitialized when Python calls `ffi.new` and when rust 
populates the passed in struct, something isn't getting zero'd out and the 
garbage uninitialized memory looks like a Go pointer (which we've seen happen 
before with ADBC). This is why the Go cdata exporters explicitly memset the 
struct to 0 before populating them. 
   
   There might be another scenario I'm missing though, since you have the 
reproducer, could you try adding something to explicitly memset the 
`ArrowSchema`/`ArrowArray` to 0 before it calls the rust exporter in the 
python? 


-- 
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