fallintoplace opened a new pull request, #947: URL: https://github.com/apache/arrow-go/pull/947
### Rationale for this change `Buffer.Reset` replaced an allocator-owned slice directly. That leaked the old allocation and later caused `Release` to pass the caller's slice to the allocator. ### What changes are included in this PR? When a buffer has an allocator, resize its owned storage and copy the replacement data into it. Non-owning buffers keep the existing zero-copy reset behavior. ### Are these changes tested? Yes. The regression test resets an allocated buffer from an unrelated slice, verifies the data is copied, releases the buffer, and checks allocator accounting. `go test ./arrow/memory` passes. ### Are there any user-facing changes? Resetting an allocator-backed buffer now copies the supplied data so ownership and release behavior remain valid. -- 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]
