You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Light-City (via GitHub)" <gi...@apache.org> on 2023/07/31 12:58:12 UTC

[GitHub] [arrow] Light-City opened a new issue, #36949: [C++] light_array buffer boundary assertion?

Light-City opened a new issue, #36949:
URL: https://github.com/apache/arrow/issues/36949

   ### Describe the bug, including details regarding any error messages, version, and platform.
   
   
   ```cpp
     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 equal kMaxBuffers, will the buffers_boundary be exceeded?
   
   Soļ¼Œthis is a bug?
   
   
   index should [0,1, 2] but not include 3
   
   ### Component(s)
   
   C++


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] pitrou closed issue #36949: [C++] light_array buffer boundary assertion?

Posted by "pitrou (via GitHub)" <gi...@apache.org>.
pitrou closed issue #36949: [C++] light_array buffer boundary assertion?
URL: https://github.com/apache/arrow/issues/36949


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org