sahib commented on code in PR #323:
URL: https://github.com/apache/arrow-go/pull/323#discussion_r2007831489
##########
arrow/ipc/reader.go:
##########
@@ -36,12 +36,15 @@ import (
// Reader expects a schema (plus any dictionaries) as the first messages
// in the stream, followed by records.
type Reader struct {
+ // refCount needs to be 64-bit aligned
+ // https://pkg.go.dev/sync/atomic#pkg-note-BUG
+ refCount int64
Review Comment:
It does because it's now at the start of the struct. The issue was that
`schema *arrow.Schema` is a pointer, which is 32-bit on `arm` (without it being
`arm64`).
Using `atomic.Int64` would be indeed a safer option since it does [alignment
automatically](https://cs.opensource.google/go/go/+/refs/tags/go1.24.1:src/sync/atomic/type.go;l=101)
. Good point! :+1:
--
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]