orlp commented on issue #28: URL: https://github.com/apache/arrow-go/issues/28#issuecomment-3319937256
> but Polars isn't being a very good citizen either by passing a pointer that it doesn't own We don't pass a *pointer* we don't own, we pass a *range*, starting at a particular location. Since the range is empty, it can start anywhere. I did a quick browse through `arrow-rs`, and as far as I can see they do the exact same thing. If a buffer was created from a zero-length `Vec` and then exported to FFI, the pointer is a dangling pointer. > We could actually strength the requirement for pointers in the C Data Interface spec, because it seems otherwise that can trip up Go (and perhaps other garbage-collected languages?). I don't think you can (or would want to) add requirements like that post-facto. I really think the onus is on the Go FFI implementation to make sure they can handle zero-length slices correctly without tripping up the garbage collector. -- 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]
