WillAyd opened a new issue, #47057: URL: https://github.com/apache/arrow/issues/47057
### Describe the bug, including details regarding any error messages, version, and platform. Originally discovered in https://github.com/apache/arrow/issues/47033#issuecomment-3052829306 , it looks like we have some UB in the compute tests. Here's a sample traceback: ```sh [ RUN ] TestIfElseKernel.DayTimeInterval stderr: ../src/arrow/compute/kernels/codegen_internal.h:408:51: runtime error: load of misaligned address 0x6e8f18d912cc for type 'const T', which requires 8 byte alignment 0x6e8f18d912cc: note: pointer points here 01 be be be 01 00 00 00 02 00 00 00 be be be be 00 00 00 00 00 00 00 00 b9 96 6e cc b9 96 6e cc ^ #0 0x721f223f7162 in arrow::compute::internal::UnboxScalar<arrow::UInt64Type, void>::Unbox(arrow::Scalar const&) ../src/arrow/compute/kernels/codegen_internal.h:408 #1 0x721f23eb799b in operator() ../src/arrow/compute/kernels/scalar_if_else.cc:445 #2 0x721f23f4a7bc in RunIfElseScalar<arrow::compute::internal::(anonymous namespace)::IfElseFunctor<arrow::UInt64Type, void>::Call(arrow::compute::KernelContext*, const arrow::BooleanScalar&, const arrow::compute::ExecValue&, const arrow::compute::ExecValue&, arrow::compute::ExecResult*)::<lambda(const arrow::ArraySpan&, arrow::ArraySpan*)>, arrow::compute::internal::(anonymous namespace)::IfElseFunctor<arrow::UInt64Type, void>::Call(arrow::compute::KernelContext*, const arrow::BooleanScalar&, const arrow::compute::ExecValue&, const arrow::compute::ExecValue&, arrow::compute::ExecResult*)::<lambda(const arrow::Scalar&, arrow::ArraySpan*)> > ../src/arrow/compute/kernels/scalar_if_else.cc:411 #3 0x721f23eb7c99 in Call ../src/arrow/compute/kernels/scalar_if_else.cc:448 #4 0x721f23e85272 in Exec ../src/arrow/compute/kernels/scalar_if_else.cc:1161 #5 0x721f3d8d7e78 in ExecuteSingleSpan ../src/arrow/compute/exec.cc:891 #6 0x721f3d8d6357 in ExecuteSpans ../src/arrow/compute/exec.cc:859 #7 0x721f3d8d4e90 in Execute ../src/arrow/compute/exec.cc:808 #8 0x721f3da2c4a0 in arrow::compute::detail::FunctionExecutorImpl::Execute(std::vector<arrow::Datum, std::allocator<arrow::Datum> > const&, long) ../src/arrow/compute/function.cc:278 #9 0x721f3da204bc in ExecuteInternal ../src/arrow/compute/function.cc:343 #10 0x721f3da207f2 in arrow::compute::Function::Execute(std::vector<arrow::Datum, std::allocator<arrow::Datum> > const&, arrow::compute::FunctionOptions const*, arrow::compute::ExecContext*) const ../src/arrow/compute/function.cc:350 #11 0x721f3d8ebf93 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*) ../src/arrow/compute/exec.cc:1369 #12 0x721f3d8ec10c 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::ExecContext*) ../src/arrow/compute/exec.cc:1374 #13 0x721f3d5b0b9c in arrow::compute::IfElse(arrow::Datum const&, arrow::Datum const&, arrow::Datum const&, arrow::compute::ExecContext*) ../src/arrow/compute/api_scalar.cc:870 #14 0x5b61f2a598ea in arrow::compute::DoCheckWithDifferentShapes(std::shared_ptr<arrow::Array> const&, std::shared_ptr<arrow::Array> const&, std::shared_ptr<arrow::Array> const&, std::shared_ptr<arrow::Array> const&) ../src/arrow/compute/kernels/scalar_if_else_test.cc:222 #15 0x5b61f2a5aec4 in arrow::compute::CheckWithDifferentShapes(std::shared_ptr<arrow::Array> const&, std::shared_ptr<arrow::Array> const&, std::shared_ptr<arrow::Array> const&, std::shared_ptr<arrow::Array> const&) ../src/arrow/compute/kernels/scalar_if_else_test.cc:238 #16 0x5b61f2a63914 in arrow::compute::TestIfElseKernel_DayTimeInterval_Test::TestBody() ../src/arrow/compute/kernels/scalar_if_else_test.cc:458 #17 0x721f4ce3aebd in void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) ../subprojects/googletest-1.17.0/googletest/src/gtest.cc:2664 #18 0x721f4ce301ea in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) ../subprojects/googletest-1.17.0/googletest/src/gtest.cc:2700 #19 0x721f4ce03c90 in testing::Test::Run() ../subprojects/googletest-1.17.0/googletest/src/gtest.cc:2739 #20 0x721f4ce04804 in testing::TestInfo::Run() ../subprojects/googletest-1.17.0/googletest/src/gtest.cc:2885 #21 0x721f4ce05208 in testing::TestSuite::Run() ../subprojects/googletest-1.17.0/googletest/src/gtest.cc:3063 #22 0x721f4ce16dab in testing::internal::UnitTestImpl::RunAllTests() ../subprojects/googletest-1.17.0/googletest/src/gtest.cc:6054 #23 0x721f4ce3c46e in bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) ../subprojects/googletest-1.17.0/googletest/src/gtest.cc:2664 #24 0x721f4ce3194e in bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) ../subprojects/googletest-1.17.0/googletest/src/gtest.cc:2700 #25 0x721f4ce14cba in testing::UnitTest::Run() ../subprojects/googletest-1.17.0/googletest/src/gtest.cc:5594 #26 0x721f4ce9a395 in RUN_ALL_TESTS() ../subprojects/googletest-1.17.0/googletest/include/gtest/gtest.h:2334 #27 0x721f4ce993c9 in main ../src/arrow/compute/test_env.cc:50 #28 0x721f3222a337 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 #29 0x721f3222a3fa in __libc_start_main_impl ../csu/libc-start.c:360 #30 0x5b61f2a53664 in _start (/home/will/clones/arrow/cpp/builddir/src/arrow/compute/kernels/arrow-compute-scalar-if-else-test+0x117b664) (BuildId: 03bde7ce67f8ec9b05a75ea218f71c0413013709) SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../src/arrow/compute/kernels/codegen_internal.h:408:51 ``` ### 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-unsubscr...@arrow.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org