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

[C++] Buffer::mutable_data_ member uninitialized

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.8.0
    • Fix Version/s: 0.9.0
    • Component/s: C++

      Description

      For immutable buffers (i.e. most of them), the mutable_data_ member is uninitialized. If the user calls mutable_data() by mistake on such a buffer, they will get a bogus pointer back.

      This is exacerbated by the Tensor API whose const and non-const raw_data() methods return different things...

      (also an idea: add a DCHECK for mutability before returning from mutable_data()?)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                pitrou Antoine Pitrou
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: