NickCrews commented on PR #43782:
URL: https://github.com/apache/arrow/pull/43782#issuecomment-2648777160

   I'm getting these failing UBSAN errors in CI. See below for the relevant 
logs. Is it because of the new `std::vector<std::shared_ptr<Array>> 
arrays_dest_ac = {arrays_dest[0], arrays_dest[2]}` code that I added? Is there 
a good way to silence/ignore this error?
   
   <details>
   <summary>Details</summary>
   
   ```
   [ RUN      ] Cast.StructToStructSubset
   
/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/stl_vector.h:1064:34:
 runtime error: addition of unsigned offset to 0x60700006f300 overflowed to 
0x60700006f2e0
       #0 0x7f811aca4bc8 in std::vector<std::shared_ptr<arrow::Field>, 
std::allocator<std::shared_ptr<arrow::Field> > >::operator[](unsigned long) 
const 
/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/stl_vector.h:1064:34
       #1 0x7f811ac9b27a in arrow::DataType::field(int) const 
/arrow/cpp/src/arrow/type.h:153:61
       #2 0x7f8105e4f8f1 in arrow::compute::internal::(anonymous 
namespace)::CastStruct::Exec(arrow::compute::KernelContext*, 
arrow::compute::ExecSpan const&, arrow::compute::ExecResult*) 
/arrow/cpp/src/arrow/compute/kernels/scalar_cast_nested.cc:403:38
       #3 0x7f8105ab206e in arrow::compute::detail::(anonymous 
namespace)::ScalarExecutor::ExecuteNonSpans(arrow::compute::detail::ExecListener*)
 /arrow/cpp/src/arrow/compute/exec.cc:920:7
       #4 0x7f8105aa99fa in arrow::compute::detail::(anonymous 
namespace)::ScalarExecutor::Execute(arrow::compute::ExecBatch const&, 
arrow::compute::detail::ExecListener*) 
/arrow/cpp/src/arrow/compute/exec.cc:810:14
       #5 0x7f8105c471a6 in 
arrow::compute::detail::FunctionExecutorImpl::Execute(std::vector<arrow::Datum, 
std::allocator<arrow::Datum> > const&, long) 
/arrow/cpp/src/arrow/compute/function.cc:278:5
       #6 0x7f8105c17bfe in arrow::compute::(anonymous 
namespace)::ExecuteInternal(arrow::compute::Function const&, 
std::vector<arrow::Datum, std::allocator<arrow::Datum> >, long, 
arrow::compute::FunctionOptions const*, arrow::compute::ExecContext*) 
/arrow/cpp/src/arrow/compute/function.cc:343:21
       #7 0x7f8105c16d84 in 
arrow::compute::Function::Execute(std::vector<arrow::Datum, 
std::allocator<arrow::Datum> > const&, arrow::compute::FunctionOptions const*, 
arrow::compute::ExecContext*) const 
/arrow/cpp/src/arrow/compute/function.cc:350:10
       #8 0x7f8105a5d13c in arrow::compute::internal::(anonymous 
namespace)::CastMetaFunction::ExecuteImpl(std::vector<arrow::Datum, 
std::allocator<arrow::Datum> > const&, arrow::compute::FunctionOptions const*, 
arrow::compute::ExecContext*) const /arrow/cpp/src/arrow/compute/cast.cc:124:23
       #9 0x7f8105c21b5c in 
arrow::compute::MetaFunction::Execute(std::vector<arrow::Datum, 
std::allocator<arrow::Datum> > const&, arrow::compute::FunctionOptions const*, 
arrow::compute::ExecContext*) const 
/arrow/cpp/src/arrow/compute/function.cc:483:10
       #10 0x7f8105a8cfc8 in 
arrow::compute::CallFunction(std::__cxx11::basic_string<char, 
std::char_traits<char>, std::allocator<char> > const&, 
std::vector<arrow::Datum, std::allocator<arrow::Datum> > const&, 
arrow::compute::FunctionOptions const*, arrow::compute::ExecContext*) 
/arrow/cpp/src/arrow/compute/exec.cc:1369:16
       #11 0x55f68eeb23c9 in 
arrow::compute::CheckScalarNonRecursive(std::__cxx11::basic_string<char, 
std::char_traits<char>, std::allocator<char> > const&, 
std::vector<arrow::Datum, std::allocator<arrow::Datum> > const&, arrow::Datum 
const&, arrow::compute::FunctionOptions const*) 
/arrow/cpp/src/arrow/compute/kernels/test_util_internal.cc:80:3
       #12 0x55f68eeb8480 in 
arrow::compute::CheckScalar(std::__cxx11::basic_string<char, 
std::char_traits<char>, std::allocator<char> >, std::vector<arrow::Datum, 
std::allocator<arrow::Datum> > const&, arrow::Datum, 
arrow::compute::FunctionOptions const*) 
/arrow/cpp/src/arrow/compute/kernels/test_util_internal.cc:109:3
       #13 0x55f68eecc36c in 
arrow::compute::CheckScalarUnary(std::__cxx11::basic_string<char, 
std::char_traits<char>, std::allocator<char> >, arrow::Datum, arrow::Datum, 
arrow::compute::FunctionOptions const*) 
/arrow/cpp/src/arrow/compute/kernels/test_util_internal.cc:255:3
       #14 0x55f68ef4d8f7 in 
arrow::compute::CheckCast(std::shared_ptr<arrow::Array>, 
std::shared_ptr<arrow::Array>, arrow::compute::CastOptions) 
/arrow/cpp/src/arrow/compute/kernels/scalar_cast_test.cc:111:3
       #15 0x55f68f079ab8 in 
arrow::compute::CheckStructToStructSubset(std::vector<std::shared_ptr<arrow::DataType>,
 std::allocator<std::shared_ptr<arrow::DataType> > > const&) 
/arrow/cpp/src/arrow/compute/kernels/scalar_cast_test.cc:3829:7
       #16 0x55f68f06d09f in 
arrow::compute::Cast_StructToStructSubset_Test::TestBody() 
/arrow/cpp/src/arrow/compute/kernels/scalar_cast_test.cc:4003:36
       #17 0x7f811af8260e in void 
testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, 
void>(testing::Test*, void (testing::Test::*)(), char const*) 
(/usr/local/lib/libarrow_testing.so.2000+0x108c60e) (BuildId: 
408b230591f17f240ad9d2b7d868274f1179009d)
       #18 0x7f811af770c5 in testing::Test::Run() 
(/usr/local/lib/libarrow_testing.so.2000+0x10810c5) (BuildId: 
408b230591f17f240ad9d2b7d868274f1179009d)
       #19 0x7f811af77244 in testing::TestInfo::Run() 
(/usr/local/lib/libarrow_testing.so.2000+0x1081244) (BuildId: 
408b230591f17f240ad9d2b7d868274f1179009d)
       #20 0x7f811af777f8 in testing::TestSuite::Run() 
(/usr/local/lib/libarrow_testing.so.2000+0x10817f8) (BuildId: 
408b230591f17f240ad9d2b7d868274f1179009d)
       #21 0x7f811af77efe in testing::internal::UnitTestImpl::RunAllTests() 
(/usr/local/lib/libarrow_testing.so.2000+0x1081efe) (BuildId: 
408b230591f17f240ad9d2b7d868274f1179009d)
       #22 0x7f811af82bd6 in bool 
testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl,
 bool>(testing::internal::UnitTestImpl*, bool 
(testing::internal::UnitTestImpl::*)(), char const*) 
(/usr/local/lib/libarrow_testing.so.2000+0x108cbd6) (BuildId: 
408b230591f17f240ad9d2b7d868274f1179009d)
       #23 0x7f811af7730b in testing::UnitTest::Run() 
(/usr/local/lib/libarrow_testing.so.2000+0x108130b) (BuildId: 
408b230591f17f240ad9d2b7d868274f1179009d)
       #24 0x55f68edefb33 in main 
(/build/cpp/debug/arrow-compute-scalar-cast-test+0x2adb33) (BuildId: 
c176b331f0537175685c7888a83fc8e112006f6a)
       #0 0x7f80f7d06d8f in
       #26 0x7f80f7d06e3f in __libc_start_main 
(/lib/x86_64-linux-gnu/libc.so.6+0x29e3f) (BuildId: 
cd410b710f0f094c6832edd95931006d883af48e)
       #27 0x55f68edefb94 in _start 
(/build/cpp/debug/arrow-compute-scalar-cast-test+0x2adb94) (BuildId: 
c176b331f0537175685c7888a83fc8e112006f6a)
   
   SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior 
/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/stl_vector.h:1064:34
 in
   /build/cpp/src/arrow/compute/kernels
   
         Start 22: arrow-compute-scalar-cast-test
       Test #22: arrow-compute-scalar-cast-test ...............***Failed   
12.44 sec
   ```
   
   </details>


-- 
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