bit2swaz commented on issue #10679: URL: https://github.com/apache/arrow-rs/issues/10679#issuecomment-5334351316
> B sounds good to me great, ill go with B then > Can you also please provide an test case that shows that this is actually a problem? i can build a foreign-shaped `FFI_ArrowSchema` in the test without needing an actual cpp or java producer: set `private_data` to a box that isnt a `SchemaPrivateData` with its own release callback, same shape the c data interface hands us. calling `with_metadata` on that today hits the [cast at ffi.rs#L246](https://github.com/apache/arrow-rs/blob/cb20cc4bfd0fd29bf31d4c4c5c783174d9fcbff6/arrow-schema/src/ffi.rs#L246) and reinterprets those bytes as our type. the test will show that returns `Err` after the fix instead of being UB ill also add a pyarrow roundtrip in arrow-pyarrow-integration-testing so theres a real cross-language case on top of the unit test. if thats alright, then ill get a PR otw :) -- 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]
