You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Rok Mihevc (Jira)" <ji...@apache.org> on 2023/01/11 07:20:04 UTC

[jira] [Commented] (ARROW-2275) [C++] Buffer::mutable_data_ member uninitialized

    [ https://issues.apache.org/jira/browse/ARROW-2275?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17659302#comment-17659302 ] 

Rok Mihevc commented on ARROW-2275:
-----------------------------------

This issue has been migrated to [issue #18232|https://github.com/apache/arrow/issues/18232] on GitHub. Please see the [migration documentation|https://github.com/apache/arrow/issues/14542] for further details.

> [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
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 0.9.0
>
>
> 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
(v8.20.10#820010)