WillAyd commented on code in PR #448:
URL: https://github.com/apache/arrow-nanoarrow/pull/448#discussion_r1602065133
##########
src/nanoarrow/buffer_test.cc:
##########
@@ -141,9 +141,6 @@ TEST(BufferTest, BufferTestFill) {
}
ArrowBufferReset(&buffer);
-
Review Comment:
These were removed because they won't compile with `-Warray-bounds`:
```sh
In file included from /usr/include/string.h:535,
from /usr/include/c++/11/cstring:42,
from ../src/nanoarrow/buffer_test.cc:19:
In function ‘void* memcpy(void*, const void*, size_t)’,
inlined from ‘void ArrowBufferAppendUnsafe(ArrowBuffer*, const void*,
int64_t)’ at ../src/nanoarrow/buffer_inline.h:134:11,
inlined from ‘ArrowErrorCode ArrowBufferAppend(ArrowBuffer*, const
void*, int64_t)’ at ../src/nanoarrow/buffer_inline.h:143:26,
inlined from ‘ArrowErrorCode ArrowBufferAppend(ArrowBuffer*, const
void*, int64_t)’ at ../src/nanoarrow/buffer_inline.h:139:30,
inlined from ‘virtual void BufferTest_BufferTestError_Test::TestBody()’
at ../src/nanoarrow/buffer_test.cc:174:3:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:29:33: error: ‘void*
__builtin_memcpy(void*, const void*, long unsigned int)’ forming offset [48,
9223372036854775806] is out of the bounds [0, 48] of object ‘buffer’ with type
‘ArrowBuffer’ [-Werror=array-bounds]
29 | return __builtin___memcpy_chk (__dest, __src, __len,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
30 | __glibc_objsize0 (__dest));
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/nanoarrow/buffer_test.cc: In member function ‘virtual void
BufferTest_BufferTestError_Test::TestBody()’:
../src/nanoarrow/buffer_test.cc:170:22: note: ‘buffer’ declared here
170 | struct ArrowBuffer buffer;
| ^~~~~~
cc1plus: all warnings being treated as errors
```
--
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]