Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
apacheGH-35095: [C++] Prevent write after close in arrow::ipc::IpcFor…
…matWriter (apache#37783) This addresses apacheGH-35095 by adding a flag to IpcFormatWriter to track when a writer has been closed, and check this flag before writes. ### Rationale for this change This addresses apache#35095 , preventing stream and file IPC writers from writing record batches once the IPC writer has been closed. ### What changes are included in this PR? Adding a flag so that an IpcFormatWriter to track when it's been closed, a check before writes in IpcFormatWriter, and two tests to confirm it works as expected. ### Are these changes tested? Yes, the changes are tested. The two tests were added, and the C++ test suite ran. No unexpected failures appeared. ### Are there any user-facing changes? Other than newly returning an invalid status when writing after close, no, there should not be any user-facing changes. * Closes: apache#35095 Lead-authored-by: Chris Jordan-Squire <chris.jordansquire@gmail.com> Co-authored-by: Sutou Kouhei <kou@cozmixng.org> Signed-off-by: Sutou Kouhei <kou@clear-code.com>
- Loading branch information