zeroshade commented on code in PR #14877:
URL: https://github.com/apache/arrow/pull/14877#discussion_r1043706977


##########
go/arrow/cdata/cdata.go:
##########
@@ -613,6 +639,12 @@ func (imp *cimporter) checkNumBuffers(n int64) error {
 func (imp *cimporter) importBuffer(bufferID int, sz int64) *memory.Buffer {
        // this is not a copy, we're just having a slice which points at the 
data
        // it's still owned by the C.ArrowArray object and its backing C++ 
object.
+       if imp.cbuffers[bufferID] == nil {
+               if sz != 0 {
+                       panic("invalid buffer")

Review Comment:
   `panic` *can* be caught and handled via `defer` and `recover`, otherwise it 
will be a controlled crash with a stack trace (unless debug info was stripped 
when building).



-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to