hcrosse opened a new pull request, #1544: URL: https://github.com/apache/arrow-go/pull/1544
### Rationale for this change A view array with no data buffers exports a `NULL` pointer for its variadic buffer sizes. The C data interface allows `NULL` for an empty buffer, but `exportArray` uses `kGoCdataZeroRegion` for other empty buffers to support consumers that do not import `NULL` (apache/arrow#33936). ### What changes are included in this PR? `exportArray` points an empty sizes buffer at `kGoCdataZeroRegion`, and `releaseExportedArray` skips freeing it. Freeing the zero region crashes the `string_view_inline` row and produces a `SEGV` in the `-asan` run. ### Are these changes tested? `TestExtensionArrayRoundTrip` now checks that the last exported buffer is not `NULL`. The `string_view_inline` row fails without this change and passes with it. With Go 1.26.10, `go test -race -tags assert,test ./arrow/cdata/...`, `go test -asan -short -tags assert,test ./arrow/cdata/...` on Linux, `golangci-lint` 2.13.2 and the Release Audit Tool passed. ### Are there any user-facing changes? Yes. Exported view arrays with no data buffers point their sizes buffer at the zero region instead of `NULL`. There is no API change. -- 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]
