wjones127 opened a new issue, #4659: URL: https://github.com/apache/arrow-rs/issues/4659
**Describe the bug** Got a double free when consuming a stream and trying to return the error. Right now the C Stream Interface import tries to take ownership of the error string, but once the release callback is called that string gets freed. https://github.com/apache/arrow-rs/blob/f16ceedf981c7230167ff858eabb9a8cdc87ffda/arrow/src/ffi_stream.rs#L317-L327 From [the C stream interface docs](https://arrow.apache.org/docs/format/CStreamInterface.html#c.ArrowArrayStream.get_last_error): > The returned pointer is only guaranteed to be valid until the next call of one of the stream’s callbacks. The character string it points to should be copied to consumer-managed storage if it is intended to survive longer. **To Reproduce** <!-- Steps to reproduce the behavior: --> **Expected behavior** We should probably clone the string as suggested by the interface docs. **Additional context** <!-- Add any other context about the problem here. --> -- 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]
