bit2swaz commented on issue #10253: URL: https://github.com/apache/arrow-rs/issues/10253#issuecomment-5069931240
o shi yeah, hadnt thought about Drop. and i do agree, slapping `unsafe` on `try_new` doesnt really close that vector. Drop gets called implicitly and you cant mark `drop` unsafe the way i see it, the real fix is making the fields private. that way you cant construct an `FFI_ArrowArrayStream` with garbage callbacks in safe Rust at all which kills both the `try_new` problem and the Drop problem at the root. layout stays `#[repr(C)]` so external C producers arent affected as theyd still pass via `from_raw` which is already `unsafe`, and the the Rust-side constructors (`new`, `empty`) stay safe tho that does mean my current PR is at best a half-fix. happy to extend it, OR close it and redo it properly in one shot, whatever works for you. what do you say? -- 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]
