Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-15733

array.String offsets int32 overflow

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 7.0.0
    • 10.0.0
    • Go
    • None

    Description

      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/v7@v7.0.0/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/v7@v7.0.0/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/v7@v7.0.0/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/v7@v7.0.0/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/v7@v7.0.0/arrow/ipc/file_writer.go:342 +0x20d
      main.main()

      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.

      Attachments

        Issue Links

          Activity

            People

              zeroshade Matthew Topol
              astrelsky Andrew Strelsky
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: