Antoine Pitrou created ARROW-2275:
-------------------------------------

             Summary: [C++] Buffer::mutable_data_ member uninitialized
                 Key: ARROW-2275
                 URL: https://issues.apache.org/jira/browse/ARROW-2275
             Project: Apache Arrow
          Issue Type: Bug
          Components: C++
    Affects Versions: 0.8.0
            Reporter: Antoine Pitrou


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()}}?)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to