Skip to content

[C++] light_array buffer boundary assertion? #36949

Closed

Description

@Light-City

light_array KeyColumnArray assert

  uint8_t* mutable_data(int i) {
    ARROW_DCHECK(i >= 0 && i <= kMaxBuffers);
    return mutable_buffers_[i];
  }
  /// \brief Return one of the underlying read-only buffers
  const uint8_t* data(int i) const {
    ARROW_DCHECK(i >= 0 && i <= kMaxBuffers);
    return buffers_[i];
  }

ARROW_DCHECK(i >= 0 && i <= kMaxBuffers); may be wrong?

static constexpr int kMaxBuffers = 3;
  const uint8_t* buffers_[kMaxBuffers];
  uint8_t* mutable_buffers_[kMaxBuffers];

when data(i) i equl kMaxBuffers, will the buffers_boundary be exceeded?

So,this is a bug?

index should [0,1, 2] but not include 3

Component(s)

C++

Activity

  1. added a commit that references this issue on Aug 10, 2023
  2. added this to the 14.0.0 milestone on Aug 10, 2023
  3. added a commit that references this issue on Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions