paleolimbot opened a new issue, #662:
URL: https://github.com/apache/arrow-nanoarrow/issues/662

   Kindly reproducible thanks to @vyasr (see 
https://github.com/apache/arrow-nanoarrow/pull/639#issuecomment-2412525436 ). 
PR demonstrating the issue: https://github.com/rapidsai/cudf/pull/17083
   
   The traceback is similar to one that was "fixed" in our CI by adding 
`NANOARROW_DCHECK()`s to help clang-tidy (at least on our local run) see 
through some of the invariants we know about with respect to what happens on 
the "reserve" step (or maybe I'm reading this too quickly and clang-tidy has 
identified an issue).
   
   One traceback:
   
   ```
   /__w/cudf/cudf/cpp/tests/interop/nanoarrow_utils.hpp:259:5: warning: Null 
pointer passed to 1st parameter expecting 'nonnull' 
[clang-analyzer-core.NonNullParamChecker]
     259 |     std::memset(out.buffer.data, 0, out.buffer.size_bytes);
         |     ^
   /__w/cudf/cudf/cpp/tests/interop/from_arrow_host_test.cpp:104:29: note: 
Calling 'get_nanoarrow_host_tables'
     104 |   auto [tbl, schema, arr] = get_nanoarrow_host_tables(0);
         |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   /__w/cudf/cudf/cpp/tests/interop/from_arrow_host_test.cpp:54:21: note: 
Calling 'get_nanoarrow_array<bool>'
      54 |   auto boolarray  = get_nanoarrow_array<bool>(test_data.bool_data, 
test_data.bool_validity);
         |                     
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   /__w/cudf/cudf/cpp/tests/interop/nanoarrow_utils.hpp:253:3: note: Assuming 
'errno_status_92' is 0
     253 |   NANOARROW_THROW_NOT_OK(ArrowArrayInitFromType(tmp.get(), 
NANOARROW_TYPE_BOOL));
         |   ^
   
/__w/cudf/cudf/cpp/build/_deps/nanoarrow-src/src/nanoarrow/nanoarrow.hpp:80:32: 
note: expanded from macro 'NANOARROW_THROW_NOT_OK'
      80 |   _NANOARROW_THROW_NOT_OK_IMPL(_NANOARROW_MAKE_NAME(errno_status_, 
__COUNTER__), EXPR, \
         |                                
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   
/__w/cudf/cudf/cpp/build/_deps/nanoarrow-src/src/nanoarrow/common/inline_types.h:137:36:
 note: expanded from macro '_NANOARROW_MAKE_NAME'
     137 | #define _NANOARROW_MAKE_NAME(x, y) _NANOARROW_CONCAT(x, y)
         |                                    ^~~~~~~~~~~~~~~~~~~~~~~
   
/__w/cudf/cudf/cpp/build/_deps/nanoarrow-src/src/nanoarrow/common/inline_types.h:136:33:
 note: expanded from macro '_NANOARROW_CONCAT'
     136 | #define _NANOARROW_CONCAT(x, y) x##y
         |                                 ^~~~
   note: expanded from here
   
/__w/cudf/cudf/cpp/build/_deps/nanoarrow-src/src/nanoarrow/nanoarrow.hpp:71:9: 
note: expanded from macro '_NANOARROW_THROW_NOT_OK_IMPL'
      71 |     if (NAME) {                                                      
 \
         |         ^~~~
   /__w/cudf/cudf/cpp/tests/interop/nanoarrow_utils.hpp:253:3: note: Taking 
false branch
     253 |   NANOARROW_THROW_NOT_OK(ArrowArrayInitFromType(tmp.get(), 
NANOARROW_TYPE_BOOL));
         |   ^
   
/__w/cudf/cudf/cpp/build/_deps/nanoarrow-src/src/nanoarrow/nanoarrow.hpp:80:3: 
note: expanded from macro 'NANOARROW_THROW_NOT_OK'
      80 |   _NANOARROW_THROW_NOT_OK_IMPL(_NANOARROW_MAKE_NAME(errno_status_, 
__COUNTER__), EXPR, \
         |   ^
   
/__w/cudf/cudf/cpp/build/_deps/nanoarrow-src/src/nanoarrow/nanoarrow.hpp:71:5: 
note: expanded from macro '_NANOARROW_THROW_NOT_OK_IMPL'
      71 |     if (NAME) {                                                      
 \
         |     ^
   /__w/cudf/cudf/cpp/tests/interop/nanoarrow_utils.hpp:253:3: note: Loop 
condition is false.  Exiting loop
     253 |   NANOARROW_THROW_NOT_OK(ArrowArrayInitFromType(tmp.get(), 
NANOARROW_TYPE_BOOL));
         |   ^
   
/__w/cudf/cudf/cpp/build/_deps/nanoarrow-src/src/nanoarrow/nanoarrow.hpp:80:3: 
note: expanded from macro 'NANOARROW_THROW_NOT_OK'
      80 |   _NANOARROW_THROW_NOT_OK_IMPL(_NANOARROW_MAKE_NAME(errno_status_, 
__COUNTER__), EXPR, \
         |   ^
   
/__w/cudf/cudf/cpp/build/_deps/nanoarrow-src/src/nanoarrow/nanoarrow.hpp:69:3: 
note: expanded from macro '_NANOARROW_THROW_NOT_OK_IMPL'
         |   ^
   
/__w/cudf/cudf/cpp/build/_deps/nanoarrow-src/src/nanoarrow/common/inline_types.h:269:3:
 note: expanded from macro 'NANOARROW_RETURN_NOT_OK'
     269 |   _NANOARROW_RETURN_NOT_OK_IMPL(_NANOARROW_MAKE_NAME(errno_status_, 
__COUNTER__), EXPR)
         |   ^
   
/__w/cudf/cudf/cpp/build/_deps/nanoarrow-src/src/nanoarrow/common/inline_types.h:142:5:
 note: expanded from macro '_NANOARROW_RETURN_NOT_OK_IMPL'
     142 |     if (NAME) return NAME;                        \
         |     ^
   
/__w/cudf/cudf/cpp/build/_deps/nanoarrow-src/src/nanoarrow/common/inline_buffer.h:582:3:
 note: Loop condition is false.  Exiting loop
     582 |   NANOARROW_RETURN_NOT_OK(
         |   ^
   
/__w/cudf/cudf/cpp/build/_deps/nanoarrow-src/src/nanoarrow/common/inline_types.h:269:3:
 note: expanded from macro 'NANOARROW_RETURN_NOT_OK'
     269 |   _NANOARROW_RETURN_NOT_OK_IMPL(_NANOARROW_MAKE_NAME(errno_status_, 
__COUNTER__), EXPR)
         |   ^
   
/__w/cudf/cudf/cpp/build/_deps/nanoarrow-src/src/nanoarrow/common/inline_types.h:140:3:
 note: expanded from macro '_NANOARROW_RETURN_NOT_OK_IMPL'
     140 |   do {                                            \
         |   ^
   
/__w/cudf/cudf/cpp/build/_deps/nanoarrow-src/src/nanoarrow/common/inline_buffer.h:586:3:
 note: Returning without writing to 'bitmap->buffer.data'
     586 |   return NANOARROW_OK;
         |   ^
   /__w/cudf/cudf/cpp/tests/interop/nanoarrow_utils.hpp:258:28: note: Returning 
from 'ArrowBitmapResize'
     258 |     NANOARROW_THROW_NOT_OK(ArrowBitmapResize(&out, b.size(), 1));
         |                            ^
   
/__w/cudf/cudf/cpp/build/_deps/nanoarrow-src/src/nanoarrow/nanoarrow.hpp:80:82: 
note: expanded from macro 'NANOARROW_THROW_NOT_OK'
      80 |   _NANOARROW_THROW_NOT_OK_IMPL(_NANOARROW_MAKE_NAME(errno_status_, 
__COUNTER__), EXPR, \
         |                                                                      
            ^~~~
   
/__w/cudf/cudf/cpp/build/_deps/nanoarrow-src/src/nanoarrow/nanoarrow.hpp:70:23: 
note: expanded from macro '_NANOARROW_THROW_NOT_OK_IMPL'
      70 |     const int NAME = (EXPR);                                         
 \
         |                       ^~~~
   /__w/cudf/cudf/cpp/tests/interop/nanoarrow_utils.hpp:258:5: note: 
'errno_status_93' is 0
     258 |     NANOARROW_THROW_NOT_OK(ArrowBitmapResize(&out, b.size(), 1));
         |     ^
   
/__w/cudf/cudf/cpp/build/_deps/nanoarrow-src/src/nanoarrow/nanoarrow.hpp:80:32: 
note: expanded from macro 'NANOARROW_THROW_NOT_OK'
      80 |   _NANOARROW_THROW_NOT_OK_IMPL(_NANOARROW_MAKE_NAME(errno_status_, 
__COUNTER__), EXPR, \
         |                                
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   
/__w/cudf/cudf/cpp/build/_deps/nanoarrow-src/src/nanoarrow/common/inline_types.h:137:36:
 note: expanded from macro '_NANOARROW_MAKE_NAME'
     137 | #define _NANOARROW_MAKE_NAME(x, y) _NANOARROW_CONCAT(x, y)
         |                                    ^~~~~~~~~~~~~~~~~~~~~~~
   
/__w/cudf/cudf/cpp/build/_deps/nanoarrow-src/src/nanoarrow/common/inline_types.h:136:33:
 note: expanded from macro '_NANOARROW_CONCAT'
     136 | #define _NANOARROW_CONCAT(x, y) x##y
         |                                 ^~~~
   note: expanded from here
   
/__w/cudf/cudf/cpp/build/_deps/nanoarrow-src/src/nanoarrow/nanoarrow.hpp:71:9: 
note: expanded from macro '_NANOARROW_THROW_NOT_OK_IMPL'
      71 |     if (NAME) {                                                      
 \
         |         ^~~~
   /__w/cudf/cudf/cpp/tests/interop/nanoarrow_utils.hpp:258:5: note: Taking 
false branch
     258 |     NANOARROW_THROW_NOT_OK(ArrowBitmapResize(&out, b.size(), 1));
         |     ^
   
/__w/cudf/cudf/cpp/build/_deps/nanoarrow-src/src/nanoarrow/nanoarrow.hpp:80:3: 
note: expanded from macro 'NANOARROW_THROW_NOT_OK'
      80 |   _NANOARROW_THROW_NOT_OK_IMPL(_NANOARROW_MAKE_NAME(errno_status_, 
__COUNTER__), EXPR, \
         |   ^
   
/__w/cudf/cudf/cpp/build/_deps/nanoarrow-src/src/nanoarrow/nanoarrow.hpp:71:5: 
note: expanded from macro '_NANOARROW_THROW_NOT_OK_IMPL'
      71 |     if (NAME) {                                                      
 \
         |     ^
   /__w/cudf/cudf/cpp/tests/interop/nanoarrow_utils.hpp:258:5: note: Loop 
condition is false.  Exiting loop
     258 |     NANOARROW_THROW_NOT_OK(ArrowBitmapResize(&out, b.size(), 1));
         |     ^
   
/__w/cudf/cudf/cpp/build/_deps/nanoarrow-src/src/nanoarrow/nanoarrow.hpp:80:3: 
note: expanded from macro 'NANOARROW_THROW_NOT_OK'
      80 |   _NANOARROW_THROW_NOT_OK_IMPL(_NANOARROW_MAKE_NAME(errno_status_, 
__COUNTER__), EXPR, \
         |   ^
   
/__w/cudf/cudf/cpp/build/_deps/nanoarrow-src/src/nanoarrow/nanoarrow.hpp:69:3: 
note: expanded from macro '_NANOARROW_THROW_NOT_OK_IMPL'
      69 |   do {                                                               
 \
         |   ^
   /__w/cudf/cudf/cpp/tests/interop/nanoarrow_utils.hpp:259:5: note: Null 
pointer passed to 1st parameter expecting 'nonnull'
     259 |     std::memset(out.buffer.data, 0, out.buffer.size_bytes);
         |     ^           ~~~~~~~~~~~~~~~
   ```


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to