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

[C++] Cast segfaults on unsupported cast from list<binary> to utf8

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.17.0
    • C++

    Description

      Was messing around with some nested arrays and found a pretty easy to reproduce segfault:

      Python 3.7.6 | packaged by conda-forge | (default, Jan  7 2020, 22:33:48)
      [GCC 7.3.0] on linux
      Type "help", "copyright", "credits" or "license" for more information.
      >>> import numpy as np, pyarrow as pa
      >>> pa.__version__
      '0.16.0'
      >>> np.__version__
      '1.18.1'
      >>> x=[np.array([b'a',b'b'])]
      >>> a = pa.array(x,pa.list_(pa.binary()))
      >>> a
      <pyarrow.lib.ListArray object at 0x7fd948b108a0>
      [
        [
          61,
          62
        ]
      ]
      >>> a.cast(pa.string())
      Segmentation fault
      

      I don't know if that cast makes sense, but I left the checks on, so I would not expect a segfault from it.

      Attachments

        Issue Links

          Activity

            People

              kszucs Krisztian Szucs
              nugend Daniel Nugent
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 40m
                  40m