Andrew Strelsky created ARROW-15733:
---------------------------------------

             Summary: array.String offsets int32 overflow
                 Key: ARROW-15733
                 URL: https://issues.apache.org/jira/browse/ARROW-15733
             Project: Apache Arrow
          Issue Type: Bug
          Components: Go
    Affects Versions: 7.0.0
            Reporter: Andrew Strelsky


{panel}
panic: runtime error: slice bounds out of range [:-1352393031]

goroutine 1 [running]:
github.com/apache/arrow/go/v7/arrow/array.(*String).ValueBytes(...)
        
C:/Users/astre/Documents/go/pkg/mod/github.com/apache/arrow/go/[email protected]/arrow/array/string.go:74
github.com/apache/arrow/go/v7/arrow/ipc.(*recordEncoder).visit(0xc193b85c80, 
0xc193b9e060, \{0x10b5490, 0xc000050820})
        
C:/Users/astre/Documents/go/pkg/mod/github.com/apache/arrow/go/[email protected]/arrow/ipc/writer.go:435
 +0x2194
github.com/apache/arrow/go/v7/arrow/ipc.(*recordEncoder).visit(0xc193b85c80, 
0xc193b9e060, \{0x10b5288, 0xc000050730})
        
C:/Users/astre/Documents/go/pkg/mod/github.com/apache/arrow/go/[email protected]/arrow/ipc/writer.go:533
 +0x1431
github.com/apache/arrow/go/v7/arrow/ipc.(*recordEncoder).Encode(0xc193b85c80, 
0xc193b9e060, \{0x10b5838, 0xc193b8bc80})
        
C:/Users/astre/Documents/go/pkg/mod/github.com/apache/arrow/go/[email protected]/arrow/ipc/writer.go:267
 +0x98
github.com/apache/arrow/go/v7/arrow/ipc.(*FileWriter).Write(0xc00004e480, 
\{0x10b5838, 0xc193b8bc80})
        
C:/Users/astre/Documents/go/pkg/mod/github.com/apache/arrow/go/[email protected]/arrow/ipc/file_writer.go:342
 +0x20d
main.main()
{panel}
I have *a lot* of strings. The offsets should not only be unsigned but should 
also be larger than 4 bytes. Changing the offsets to a slice of uint32 was 
sufficient in my case but may not be for others.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to