pitrou opened a new issue, #45999:
URL: https://github.com/apache/arrow/issues/45999

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   With LLVM 20.1.1 from conda-forge I get these crashes:
   ```console
   # /build/cpp/debug/gandiva-projector-test
   Running main() from 
/build/cpp/_deps/googletest-src/googletest/src/gtest_main.cc
   [==========] Running 210 tests from 16 test suites.
   [----------] Global test environment set-up.
   [----------] 2 tests from TestBinary
   [ RUN      ] TestBinary.TestSimple
   /arrow/cpp/src/gandiva/cache.cc:61: Creating gandiva cache with capacity of 
5000
   /arrow/cpp/src/gandiva/engine.cc:282: Detected CPU Name : znver2
   /arrow/cpp/src/gandiva/engine.cc:283: Detected CPU Features: [ +prfchw 
-cldemote +avx +aes +sahf +pclmul -xop +crc32 -amx-fp8 +xsaves -avx512fp16 
-usermsr -sm4 -egpr +sse4.1 -avx512ifma +xsave +sse4.2 -tsxldtrk -sm3 -ptwrite 
-widekl -movrs -invpcid +64bit +xsavec -avx10.1-512 -avx512vpopcntdq +cmov 
-avx512vp2intersect -avx512cd +movbe -avxvnniint8 -ccmp -amx-int8 -kl 
-avx10.1-256 -sha512 -avxvnni -rtm +adx +avx2 -hreset -movdiri -serialize 
-vpclmulqdq -avx512vl -uintr -cf +clflushopt -raoint -cmpccxadd +bmi -amx-tile 
+sse -avx10.2-256 -gfni -avxvnniint16 -amx-fp16 -zu -ndd +xsaveopt +rdrnd 
-avx512f -amx-bf16 -avx512bf16 -avx512vnni -push2pop2 +cx8 -avx512bw +sse3 -pku 
-nf -amx-tf32 -amx-avx512 +fsgsbase +clzero +mwaitx -lwp +lzcnt +sha -movdir64b 
-ppx +wbnoinvd -enqcmd -amx-transpose -avx10.2-512 -avxneconvert -tbm -pconfig 
-amx-complex +ssse3 +cx16 +bmi2 +fma +popcnt -avxifma +f16c -avx512bitalg 
+rdpru +clwb +mmx +sse2 +rdseed -avx512vbmi2 -prefetchi -amx-movrs +rdpid -fma4 
-avx5
 12vbmi -shstk -vaes -waitpkg -sgx +fxsr -avx512dq +sse4a]
   gandiva-projector-test: /opt/conda/envs/arrow/include/llvm/ADT/APInt.h:127: 
llvm::APInt::APInt(unsigned int, uint64_t, bool, bool): Assertion 
`llvm::isUIntN(BitWidth, val) && "Value is not an N-bit unsigned value"' failed.
   Aborted (core dumped)
   ```
   
   Here is the gdb backtrace:
   ```
   #0  __pthread_kill_implementation (no_tid=0, signo=6, 
threadid=140408289947136) at ./nptl/pthread_kill.c:44
   #1  __pthread_kill_internal (signo=6, threadid=140408289947136) at 
./nptl/pthread_kill.c:78
   #2  __GI___pthread_kill (threadid=140408289947136, signo=signo@entry=6) at 
./nptl/pthread_kill.c:89
   #3  0x00007fb3683e1476 in __GI_raise (sig=sig@entry=6) at 
../sysdeps/posix/raise.c:26
   #4  0x00007fb3683c77f3 in __GI_abort () at ./stdlib/abort.c:79
   #5  0x00007fb3683c771b in __assert_fail_base (fmt=0x7fb36857c130 "%s%s%s:%u: 
%s%sAssertion `%s' failed.\n%n", 
       assertion=0x7fb36c48a3b0 "llvm::isUIntN(BitWidth, val) && \"Value is not 
an N-bit unsigned value\"", 
       file=0x7fb36c48a2a0 "/opt/conda/envs/arrow/include/llvm/ADT/APInt.h", 
line=127, function=<optimized out>) at ./assert/assert.c:94
   #6  0x00007fb3683d8e96 in __GI___assert_fail (assertion=0x7fb36c48a3b0 
"llvm::isUIntN(BitWidth, val) && \"Value is not an N-bit unsigned value\"", 
       file=0x7fb36c48a2a0 "/opt/conda/envs/arrow/include/llvm/ADT/APInt.h", 
line=127, 
       function=0x7fb36c48a268 "llvm::APInt::APInt(unsigned int, uint64_t, 
bool, bool)") at ./assert/assert.c:103
   #7  0x00007fb36c2335fa in llvm::APInt::APInt (this=0x7ffdef6123a0, 
numBits=32, val=18446744073709551615, isSigned=false, implicitTrunc=false)
       at /opt/conda/envs/arrow/include/llvm/ADT/APInt.h:127
   #8  0x00007fb36c23e9d7 in gandiva::LLVMTypes::int_constant<int, 32ul> 
(this=0x55fd6164c820, val=-1) at /arrow/cpp/src/gandiva/llvm_types.h:72
   #9  0x00007fb36c237550 in gandiva::LLVMTypes::i32_constant 
(this=0x55fd6164c820, val=-1) at /arrow/cpp/src/gandiva/llvm_types.h:78
   #10 0x00007fb36c433c6d in gandiva::LLVMGenerator::LoadVectorAtIndex 
(this=0x55fd616d7f10, arg_addrs=0x55fd6177c4d0, type=0x55fd61732618, idx=-1, 
name=...)
       at /arrow/cpp/src/gandiva/llvm_generator.cc:174
   #11 0x00007fb36c4343f5 in gandiva::LLVMGenerator::GetOffsetsReference 
(this=0x55fd616d7f10, arg_addrs=0x55fd6177c4d0, idx=-1, field=...)
       at /arrow/cpp/src/gandiva/llvm_generator.cc:215
   #12 0x00007fb36c435012 in gandiva::LLVMGenerator::CodeGenExprValue 
(this=0x55fd616d7f10, value_expr=..., buffer_count=9, output=..., suffix_idx=0, 
       fn_name=..., selection_vector_mode=gandiva::SelectionVector::MODE_NONE) 
at /arrow/cpp/src/gandiva/llvm_generator.cc:349
   #13 0x00007fb36c432bca in gandiva::LLVMGenerator::Add (this=0x55fd616d7f10, 
expr=..., output=...) at /arrow/cpp/src/gandiva/llvm_generator.cc:81
   #14 0x00007fb36c43300f in gandiva::LLVMGenerator::Build 
(this=0x55fd616d7f10, exprs=..., mode=gandiva::SelectionVector::MODE_NONE)
       at /arrow/cpp/src/gandiva/llvm_generator.cc:97
   #15 0x00007fb36c452dcc in gandiva::Projector::Make (schema=..., exprs=..., 
selection_vector_mode=gandiva::SelectionVector::MODE_NONE, configuration=..., 
       projector=0x7ffdef612fe0) at /arrow/cpp/src/gandiva/projector.cc:100
   #16 0x00007fb36c452539 in gandiva::Projector::Make (schema=..., exprs=..., 
configuration=..., projector=0x7ffdef612fe0)
       at /arrow/cpp/src/gandiva/projector.cc:52
   #17 0x000055fd45f52289 in gandiva::TestBinary_TestSimple_Test::TestBody 
(this=0x55fd61698b90) at /arrow/cpp/src/gandiva/tests/binary_test.cc:65
   #18 0x00007fb36891fa3d in 
testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void> 
(object=0x55fd61698b90, 
       method=&virtual testing::Test::TestBody(), location=0x7fb368933e9b "the 
test body") at /build/cpp/_deps/googletest-src/googletest/src/gtest.cc:2607
   #19 0x00007fb368916147 in 
testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void> 
(object=0x55fd61698b90, 
       method=&virtual testing::Test::TestBody(), location=0x7fb368933e9b "the 
test body") at /build/cpp/_deps/googletest-src/googletest/src/gtest.cc:2643
   #20 0x00007fb3688eeb11 in testing::Test::Run (this=0x55fd61698b90) at 
/build/cpp/_deps/googletest-src/googletest/src/gtest.cc:2682
   #21 0x00007fb3688ef615 in testing::TestInfo::Run (this=0x55fd61659440) at 
/build/cpp/_deps/googletest-src/googletest/src/gtest.cc:2861
   #22 0x00007fb3688f004b in testing::TestSuite::Run (this=0x55fd6167fca0) at 
/build/cpp/_deps/googletest-src/googletest/src/gtest.cc:3015
   #23 0x00007fb368901290 in testing::internal::UnitTestImpl::RunAllTests 
(this=0x55fd61650a20) at 
/build/cpp/_deps/googletest-src/googletest/src/gtest.cc:5855
   #24 0x00007fb368920aad in 
testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl,
 bool> (object=0x55fd61650a20, 
       method=(bool 
(testing::internal::UnitTestImpl::*)(testing::internal::UnitTestImpl * const)) 
0x7fb368900e76 <testing::internal::UnitTestImpl::RunAllTests()>, 
location=0x7fb368934900 "auxiliary test code (environments or event 
listeners)") at /build/cpp/_deps/googletest-src/googletest/src/gtest.cc:2607
   #25 0x00007fb368917508 in 
testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl,
 bool> (object=0x55fd61650a20, 
       method=(bool 
(testing::internal::UnitTestImpl::*)(testing::internal::UnitTestImpl * const)) 
0x7fb368900e76 <testing::internal::UnitTestImpl::RunAllTests()>, 
location=0x7fb368934900 "auxiliary test code (environments or event 
listeners)") at /build/cpp/_deps/googletest-src/googletest/src/gtest.cc:2643
   #26 0x00007fb3688ff4ad in testing::UnitTest::Run (this=0x7fb36895b260 
<testing::UnitTest::GetInstance()::instance>)
       at /build/cpp/_deps/googletest-src/googletest/src/gtest.cc:5438
   #27 0x00007fb36c1ca82a in RUN_ALL_TESTS () at 
/build/cpp/_deps/googletest-src/googletest/include/gtest/gtest.h:2490
   ```
   
   ### Component(s)
   
   C++, Gandiva


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

Reply via email to