There are some similar issues, but I've decided to open a separate one since I have more context here, probably.
.globl RC4_options
.type RC4_options,@function
.align 16
RC4_options:
.cfi_startproc
leaq .Lopts(%rip),%rax
movl OPENSSL_ia32cap_P(%rip),%edx
btl $20,%edx
jc .L8xchar
btl $30,%edx
jnc .Ldone
addq $25,%rax
.byte 0xf3,0xc3
.L8xchar:
addq $12,%rax
.Ldone:
.byte 0xf3,0xc3
.cfi_endproc
.align 64
.Lopts:
.byte 114,99,52,40,56,120,44,105,110,116,41,0
.byte 114,99,52,40,56,120,44,99,104,97,114,41,0
.byte 114,99,52,40,49,54,120,44,105,110,116,41,0
.byte 82,67,52,32,102,111,114,32,120,56,54,95,54,52,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121,32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46,111,114,103,62,0
.align 64
.size RC4_options,.-RC4_options
#0 0x0000564e0470204d llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/itrofimow/work/llvm-project/build/bin/llvm-bolt+0x29cd04d)
#1 0x0000564e047025fb PrintStackTraceSignalHandler(void*) Signals.cpp:0:0
#2 0x0000564e04700156 llvm::sys::RunSignalHandlers() (/home/itrofimow/work/llvm-project/build/bin/llvm-bolt+0x29cb156)
#3 0x0000564e04703725 SignalHandler(int) Signals.cpp:0:0
#4 0x00007f4abd57a520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
#5 0x00007f4abd5ce9fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
#6 0x00007f4abd57a476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
#7 0x00007f4abd5607f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
#8 0x0000564e04693504 llvm::report_fatal_error(llvm::Twine const&, bool) (/home/itrofimow/work/llvm-project/build/bin/llvm-bolt+0x295e504)
#9 0x0000564e047070b0 llvm::detail::scope_exit<std::decay<llvm::llvm_execute_on_thread_impl(void* (*)(void*), void*, std::optional<unsigned int>)::$_0>::type> llvm::make_scope_exit<llvm::llvm_execute_on_thread_impl(void* (*)(void*), void*, std::optional<unsigned int>)::$_0>(llvm::llvm_execute_on_thread_impl(void* (*)(void*), void*, std::optional<unsigned int>)::$_0&&) Threading.cpp:0:0
#10 0x0000564e04707144 llvm::llvm_thread_join_impl(unsigned long) (/home/itrofimow/work/llvm-project/build/bin/llvm-bolt+0x29d2144)
#11 0x0000564e046fc9dc llvm::thread::join() CrashRecoveryContext.cpp:0:0
#12 0x0000564e0536108d llvm::StdThreadPool::~StdThreadPool() (/home/itrofimow/work/llvm-project/build/bin/llvm-bolt+0x362c08d)
#13 0x0000564e053612f9 llvm::StdThreadPool::~StdThreadPool() (/home/itrofimow/work/llvm-project/build/bin/llvm-bolt+0x362c2f9)
#14 0x0000564e0535f40c std::default_delete<llvm::ThreadPoolInterface>::operator()(llvm::ThreadPoolInterface*) const ParallelUtilities.cpp:0:0
#15 0x0000564e0535c9e3 std::unique_ptr<llvm::ThreadPoolInterface, std::default_delete<llvm::ThreadPoolInterface>>::~unique_ptr() ParallelUtilities.cpp:0:0
#16 0x00007f4abd57d495 (/lib/x86_64-linux-gnu/libc.so.6+0x45495)
#17 0x00007f4abd57d610 on_exit (/lib/x86_64-linux-gnu/libc.so.6+0x45610)
#18 0x0000564e04908022 llvm::bolt::RewriteInstance::buildFunctionsCFG()::$_0::operator()(llvm::bolt::BinaryFunction&, unsigned short) const::'lambda'(llvm::bolt::BOLTError const&)::operator()(llvm::bolt::BOLTError const&) const RewriteInstance.cpp:0:0
#19 0x0000564e04907f77 llvm::Error llvm::ErrorHandlerTraits<void (&)(llvm::bolt::BOLTError&)>::apply<llvm::bolt::RewriteInstance::buildFunctionsCFG()::$_0::operator()(llvm::bolt::BinaryFunction&, unsigned short) const::'lambda'(llvm::bolt::BOLTError const&)>(llvm::bolt::RewriteInstance::buildFunctionsCFG()::$_0::operator()(llvm::bolt::BinaryFunction&, unsigned short) const::'lambda'(llvm::bolt::BOLTError const&)&&, std::unique_ptr<llvm::ErrorInfoBase, std::default_delete<llvm::ErrorInfoBase>>) RewriteInstance.cpp:0:0
#20 0x0000564e04907e8a llvm::Error llvm::handleErrorImpl<llvm::bolt::RewriteInstance::buildFunctionsCFG()::$_0::operator()(llvm::bolt::BinaryFunction&, unsigned short) const::'lambda'(llvm::bolt::BOLTError const&)>(std::unique_ptr<llvm::ErrorInfoBase, std::default_delete<llvm::ErrorInfoBase>>, llvm::bolt::RewriteInstance::buildFunctionsCFG()::$_0::operator()(llvm::bolt::BinaryFunction&, unsigned short) const::'lambda'(llvm::bolt::BOLTError const&)&&) RewriteInstance.cpp:0:0
#21 0x0000564e04907df3 llvm::Error llvm::handleErrors<llvm::bolt::RewriteInstance::buildFunctionsCFG()::$_0::operator()(llvm::bolt::BinaryFunction&, unsigned short) const::'lambda'(llvm::bolt::BOLTError const&)>(llvm::Error, llvm::bolt::RewriteInstance::buildFunctionsCFG()::$_0::operator()(llvm::bolt::BinaryFunction&, unsigned short) const::'lambda'(llvm::bolt::BOLTError const&)&&) RewriteInstance.cpp:0:0
#22 0x0000564e04907bb0 void llvm::handleAllErrors<llvm::bolt::RewriteInstance::buildFunctionsCFG()::$_0::operator()(llvm::bolt::BinaryFunction&, unsigned short) const::'lambda'(llvm::bolt::BOLTError const&)>(llvm::Error, llvm::bolt::RewriteInstance::buildFunctionsCFG()::$_0::operator()(llvm::bolt::BinaryFunction&, unsigned short) const::'lambda'(llvm::bolt::BOLTError const&)&&) RewriteInstance.cpp:0:0
#23 0x0000564e04907ab7 llvm::bolt::RewriteInstance::buildFunctionsCFG()::$_0::operator()(llvm::bolt::BinaryFunction&, unsigned short) const RewriteInstance.cpp:0:0
#24 0x0000564e04907a58 void std::__invoke_impl<void, llvm::bolt::RewriteInstance::buildFunctionsCFG()::$_0&, llvm::bolt::BinaryFunction&, unsigned short>(std::__invoke_other, llvm::bolt::RewriteInstance::buildFunctionsCFG()::$_0&, llvm::bolt::BinaryFunction&, unsigned short&&) RewriteInstance.cpp:0:0
#25 0x0000564e049079f5 std::enable_if<is_invocable_r_v<void, llvm::bolt::RewriteInstance::buildFunctionsCFG()::$_0&, llvm::bolt::BinaryFunction&, unsigned short>, void>::type std::__invoke_r<void, llvm::bolt::RewriteInstance::buildFunctionsCFG()::$_0&, llvm::bolt::BinaryFunction&, unsigned short>(llvm::bolt::RewriteInstance::buildFunctionsCFG()::$_0&, llvm::bolt::BinaryFunction&, unsigned short&&) RewriteInstance.cpp:0:0
#26 0x0000564e0490791d std::_Function_handler<void (llvm::bolt::BinaryFunction&, unsigned short), llvm::bolt::RewriteInstance::buildFunctionsCFG()::$_0>::_M_invoke(std::_Any_data const&, llvm::bolt::BinaryFunction&, unsigned short&&) RewriteInstance.cpp:0:0
#27 0x0000564e0535e968 std::function<void (llvm::bolt::BinaryFunction&, unsigned short)>::operator()(llvm::bolt::BinaryFunction&, unsigned short) const ParallelUtilities.cpp:0:0
#28 0x0000564e0535db6f llvm::bolt::ParallelUtilities::runOnEachFunctionWithUniqueAllocId(llvm::bolt::BinaryContext&, llvm::bolt::ParallelUtilities::SchedulingPolicy, std::function<void (llvm::bolt::BinaryFunction&, unsigned short)>, std::function<bool (llvm::bolt::BinaryFunction const&)>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, unsigned int)::$_0::operator()(std::_Rb_tree_iterator<std::pair<unsigned long const, llvm::bolt::BinaryFunction>>, std::_Rb_tree_iterator<std::pair<unsigned long const, llvm::bolt::BinaryFunction>>, unsigned short) const ParallelUtilities.cpp:0:0
#29 0x0000564e0535f048 void std::__invoke_impl<void, llvm::bolt::ParallelUtilities::runOnEachFunctionWithUniqueAllocId(llvm::bolt::BinaryContext&, llvm::bolt::ParallelUtilities::SchedulingPolicy, std::function<void (llvm::bolt::BinaryFunction&, unsigned short)>, std::function<bool (llvm::bolt::BinaryFunction const&)>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, unsigned int)::$_0&, std::_Rb_tree_iterator<std::pair<unsigned long const, llvm::bolt::BinaryFunction>>&, std::_Rb_tree_iterator<std::pair<unsigned long const, llvm::bolt::BinaryFunction>>&, unsigned int&>(std::__invoke_other, llvm::bolt::ParallelUtilities::runOnEachFunctionWithUniqueAllocId(llvm::bolt::BinaryContext&, llvm::bolt::ParallelUtilities::SchedulingPolicy, std::function<void (llvm::bolt::BinaryFunction&, unsigned short)>, std::function<bool (llvm::bolt::BinaryFunction const&)>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, unsigned int)::$_0&, std::_Rb_tree_iterator<std::pair<unsigned long const, llvm::bolt::BinaryFunction>>&, std::_Rb_tree_iterator<std::pair<unsigned long const, llvm::bolt::BinaryFunction>>&, unsigned int&) ParallelUtilities.cpp:0:0
#30 0x0000564e0535ef6d std::__invoke_result<llvm::bolt::ParallelUtilities::runOnEachFunctionWithUniqueAllocId(llvm::bolt::BinaryContext&, llvm::bolt::ParallelUtilities::SchedulingPolicy, std::function<void (llvm::bolt::BinaryFunction&, unsigned short)>, std::function<bool (llvm::bolt::BinaryFunction const&)>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, unsigned int)::$_0&, std::_Rb_tree_iterator<std::pair<unsigned long const, llvm::bolt::BinaryFunction>>&, std::_Rb_tree_iterator<std::pair<unsigned long const, llvm::bolt::BinaryFunction>>&, unsigned int&>::type std::__invoke<llvm::bolt::ParallelUtilities::runOnEachFunctionWithUniqueAllocId(llvm::bolt::BinaryContext&, llvm::bolt::ParallelUtilities::SchedulingPolicy, std::function<void (llvm::bolt::BinaryFunction&, unsigned short)>, std::function<bool (llvm::bolt::BinaryFunction const&)>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, unsigned int)::$_0&, std::_Rb_tree_iterator<std::pair<unsigned long const, llvm::bolt::BinaryFunction>>&, std::_Rb_tree_iterator<std::pair<unsigned long const, llvm::bolt::BinaryFunction>>&, unsigned int&>(llvm::bolt::ParallelUtilities::runOnEachFunctionWithUniqueAllocId(llvm::bolt::BinaryContext&, llvm::bolt::ParallelUtilities::SchedulingPolicy, std::function<void (llvm::bolt::BinaryFunction&, unsigned short)>, std::function<bool (llvm::bolt::BinaryFunction const&)>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, unsigned int)::$_0&, std::_Rb_tree_iterator<std::pair<unsigned long const, llvm::bolt::BinaryFunction>>&, std::_Rb_tree_iterator<std::pair<unsigned long const, llvm::bolt::BinaryFunction>>&, unsigned int&) ParallelUtilities.cpp:0:0
#31 0x0000564e0535ef37 void std::_Bind<llvm::bolt::ParallelUtilities::runOnEachFunctionWithUniqueAllocId(llvm::bolt::BinaryContext&, llvm::bolt::ParallelUtilities::SchedulingPolicy, std::function<void (llvm::bolt::BinaryFunction&, unsigned short)>, std::function<bool (llvm::bolt::BinaryFunction const&)>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, unsigned int)::$_0 (std::_Rb_tree_iterator<std::pair<unsigned long const, llvm::bolt::BinaryFunction>>, std::_Rb_tree_iterator<std::pair<unsigned long const, llvm::bolt::BinaryFunction>>, unsigned int)>::__call<void, 0ul, 1ul, 2ul>(std::tuple<>&&, std::_Index_tuple<0ul, 1ul, 2ul>) ParallelUtilities.cpp:0:0
#32 0x0000564e0535eea6 void std::_Bind<llvm::bolt::ParallelUtilities::runOnEachFunctionWithUniqueAllocId(llvm::bolt::BinaryContext&, llvm::bolt::ParallelUtilities::SchedulingPolicy, std::function<void (llvm::bolt::BinaryFunction&, unsigned short)>, std::function<bool (llvm::bolt::BinaryFunction const&)>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, unsigned int)::$_0 (std::_Rb_tree_iterator<std::pair<unsigned long const, llvm::bolt::BinaryFunction>>, std::_Rb_tree_iterator<std::pair<unsigned long const, llvm::bolt::BinaryFunction>>, unsigned int)>::operator()<void>() ParallelUtilities.cpp:0:0
#33 0x0000564e0535ee75 void std::__invoke_impl<void, std::_Bind<llvm::bolt::ParallelUtilities::runOnEachFunctionWithUniqueAllocId(llvm::bolt::BinaryContext&, llvm::bolt::ParallelUtilities::SchedulingPolicy, std::function<void (llvm::bolt::BinaryFunction&, unsigned short)>, std::function<bool (llvm::bolt::BinaryFunction const&)>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, unsigned int)::$_0 (std::_Rb_tree_iterator<std::pair<unsigned long const, llvm::bolt::BinaryFunction>>, std::_Rb_tree_iterator<std::pair<unsigned long const, llvm::bolt::BinaryFunction>>, unsigned int)>&>(std::__invoke_other, std::_Bind<llvm::bolt::ParallelUtilities::runOnEachFunctionWithUniqueAllocId(llvm::bolt::BinaryContext&, llvm::bolt::ParallelUtilities::SchedulingPolicy, std::function<void (llvm::bolt::BinaryFunction&, unsigned short)>, std::function<bool (llvm::bolt::BinaryFunction const&)>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, unsigned int)::$_0 (std::_Rb_tree_iterator<std::pair<unsigned long const, llvm::bolt::BinaryFunction>>, std::_Rb_tree_iterator<std::pair<unsigned long const, llvm::bolt::BinaryFunction>>, unsigned int)>&) ParallelUtilities.cpp:0:0
#34 0x0000564e0535ee35 std::enable_if<is_invocable_r_v<void, std::_Bind<llvm::bolt::ParallelUtilities::runOnEachFunctionWithUniqueAllocId(llvm::bolt::BinaryContext&, llvm::bolt::ParallelUtilities::SchedulingPolicy, std::function<void (llvm::bolt::BinaryFunction&, unsigned short)>, std::function<bool (llvm::bolt::BinaryFunction const&)>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, unsigned int)::$_0 (std::_Rb_tree_iterator<std::pair<unsigned long const, llvm::bolt::BinaryFunction>>, std::_Rb_tree_iterator<std::pair<unsigned long const, llvm::bolt::BinaryFunction>>, unsigned int)>&>, void>::type std::__invoke_r<void, std::_Bind<llvm::bolt::ParallelUtilities::runOnEachFunctionWithUniqueAllocId(llvm::bolt::BinaryContext&, llvm::bolt::ParallelUtilities::SchedulingPolicy, std::function<void (llvm::bolt::BinaryFunction&, unsigned short)>, std::function<bool (llvm::bolt::BinaryFunction const&)>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, unsigned int)::$_0 (std::_Rb_tree_iterator<std::pair<unsigned long const, llvm::bolt::BinaryFunction>>, std::_Rb_tree_iterator<std::pair<unsigned long const, llvm::bolt::BinaryFunction>>, unsigned int)>&>(std::_Bind<llvm::bolt::ParallelUtilities::runOnEachFunctionWithUniqueAllocId(llvm::bolt::BinaryContext&, llvm::bolt::ParallelUtilities::SchedulingPolicy, std::function<void (llvm::bolt::BinaryFunction&, unsigned short)>, std::function<bool (llvm::bolt::BinaryFunction const&)>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, unsigned int)::$_0 (std::_Rb_tree_iterator<std::pair<unsigned long const, llvm::bolt::BinaryFunction>>, std::_Rb_tree_iterator<std::pair<unsigned long const, llvm::bolt::BinaryFunction>>, unsigned int)>&) ParallelUtilities.cpp:0:0
#35 0x0000564e0535ec3d std::_Function_handler<void (), std::_Bind<llvm::bolt::ParallelUtilities::runOnEachFunctionWithUniqueAllocId(llvm::bolt::BinaryContext&, llvm::bolt::ParallelUtilities::SchedulingPolicy, std::function<void (llvm::bolt::BinaryFunction&, unsigned short)>, std::function<bool (llvm::bolt::BinaryFunction const&)>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, unsigned int)::$_0 (std::_Rb_tree_iterator<std::pair<unsigned long const, llvm::bolt::BinaryFunction>>, std::_Rb_tree_iterator<std::pair<unsigned long const, llvm::bolt::BinaryFunction>>, unsigned int)>>::_M_invoke(std::_Any_data const&) ParallelUtilities.cpp:0:0
#36 0x0000564e0493f515 std::function<void ()>::operator()() const DWARFRewriter.cpp:0:0
#37 0x0000564e0493f4d5 void std::__invoke_impl<void, std::function<void ()>>(std::__invoke_other, std::function<void ()>&&) (/home/itrofimow/work/llvm-project/build/bin/llvm-bolt+0x2c0a4d5)
#38 0x0000564e0493f495 std::__invoke_result<std::function<void ()>>::type std::__invoke<std::function<void ()>>(std::function<void ()>&&) (/home/itrofimow/work/llvm-project/build/bin/llvm-bolt+0x2c0a495)
#39 0x0000564e0493f46d void std::thread::_Invoker<std::tuple<std::function<void ()>>>::_M_invoke<0ul>(std::_Index_tuple<0ul>) DWARFRewriter.cpp:0:0
#40 0x0000564e0493f415 std::thread::_Invoker<std::tuple<std::function<void ()>>>::operator()() DWARFRewriter.cpp:0:0
#41 0x0000564e0493f3dc std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker<std::tuple<std::function<void ()>>>, void>::operator()() const DWARFRewriter.cpp:0:0
#42 0x0000564e0493f2f0 std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter> std::__invoke_impl<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker<std::tuple<std::function<void ()>>>, void>&>(std::__invoke_other, std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker<std::tuple<std::function<void ()>>>, void>&) (/home/itrofimow/work/llvm-project/build/bin/llvm-bolt+0x2c0a2f0)
#43 0x0000564e0493f278 std::enable_if<is_invocable_r_v<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter>, std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker<std::tuple<std::function<void ()>>>, void>&>, std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter>>::type std::__invoke_r<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter>, std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker<std::tuple<std::function<void ()>>>, void>&>(std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker<std::tuple<std::function<void ()>>>, void>&) (/home/itrofimow/work/llvm-project/build/bin/llvm-bolt+0x2c0a278)
#44 0x0000564e0493f190 std::_Function_handler<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> (), std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::thread::_Invoker<std::tuple<std::function<void ()>>>, void>>::_M_invoke(std::_Any_data const&) DWARFRewriter.cpp:0:0
#45 0x0000564e04848e88 std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>::operator()() const JITLinkLinker.cpp:0:0
#46 0x0000564e04848be9 std::__future_base::_State_baseV2::_M_do_set(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*) JITLinkLinker.cpp:0:0
#47 0x0000564e04848e1f void std::__invoke_impl<void, void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*>(std::__invoke_memfun_deref, void (std::__future_base::_State_baseV2::*&&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*&&, bool*&&) (/home/itrofimow/work/llvm-project/build/bin/llvm-bolt+0x2b13e1f)
#48 0x0000564e04848d8d std::__invoke_result<void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*>::type std::__invoke<void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*>(void (std::__future_base::_State_baseV2::*&&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*&&, bool*&&) (/home/itrofimow/work/llvm-project/build/bin/llvm-bolt+0x2b13d8d)
#49 0x0000564e04848d54 void std::call_once<void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*>(std::once_flag&, void (std::__future_base::_State_baseV2::*&&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*&&, bool*&&)::'lambda'()::operator()() const JITLinkLinker.cpp:0:0
#50 0x0000564e04848d24 std::once_flag::_Prepare_execution::_Prepare_execution<void std::call_once<void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*>(std::once_flag&, void (std::__future_base::_State_baseV2::*&&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*&&, bool*&&)::'lambda'()>(void (std::__future_base::_State_baseV2::*&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*))::'lambda'()::operator()() const JITLinkLinker.cpp:0:0
#51 0x0000564e04848cf1 std::once_flag::_Prepare_execution::_Prepare_execution<void std::call_once<void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*>(std::once_flag&, void (std::__future_base::_State_baseV2::*&&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*&&, bool*&&)::'lambda'()>(void (std::__future_base::_State_baseV2::*&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*))::'lambda'()::__invoke() JITLinkLinker.cpp:0:0
#52 0x00007f4abd5d1ee8 (/lib/x86_64-linux-gnu/libc.so.6+0x99ee8)
#53 0x0000564e04848c9b __gthread_once(int*, void (*)()) JITLinkLinker.cpp:0:0
#54 0x0000564e04848b99 void std::call_once<void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*>(std::once_flag&, void (std::__future_base::_State_baseV2::*&&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*&&, bool*&&) (/home/itrofimow/work/llvm-project/build/bin/llvm-bolt+0x2b13b99)
#55 0x0000564e04848955 std::__future_base::_State_baseV2::_M_set_result(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>, bool) JITLinkLinker.cpp:0:0
#56 0x0000564e04940e2b std::__future_base::_Deferred_state<std::thread::_Invoker<std::tuple<std::function<void ()>>>, void>::_M_complete_async() DWARFRewriter.cpp:0:0
#57 0x0000564e0484a3bd std::__future_base::_State_baseV2::wait() JITLinkLinker.cpp:0:0
#58 0x0000564e049414aa std::__basic_future<void>::wait() const DWARFRewriter.cpp:0:0
#59 0x0000564e04941475 std::shared_future<void> llvm::ThreadPoolInterface::asyncImpl<void>(std::function<void ()>, llvm::ThreadPoolTaskGroup*)::'lambda'()::operator()() const DWARFRewriter.cpp:0:0
#60 0x0000564e04941455 void std::__invoke_impl<void, std::shared_future<void> llvm::ThreadPoolInterface::asyncImpl<void>(std::function<void ()>, llvm::ThreadPoolTaskGroup*)::'lambda'()&>(std::__invoke_other, std::shared_future<void> llvm::ThreadPoolInterface::asyncImpl<void>(std::function<void ()>, llvm::ThreadPoolTaskGroup*)::'lambda'()&) DWARFRewriter.cpp:0:0
#61 0x0000564e04941415 std::enable_if<is_invocable_r_v<void, std::shared_future<void> llvm::ThreadPoolInterface::asyncImpl<void>(std::function<void ()>, llvm::ThreadPoolTaskGroup*)::'lambda'()&>, void>::type std::__invoke_r<void, std::shared_future<void> llvm::ThreadPoolInterface::asyncImpl<void>(std::function<void ()>, llvm::ThreadPoolTaskGroup*)::'lambda'()&>(std::shared_future<void> llvm::ThreadPoolInterface::asyncImpl<void>(std::function<void ()>, llvm::ThreadPoolTaskGroup*)::'lambda'()&) DWARFRewriter.cpp:0:0
#62 0x0000564e0494128d std::_Function_handler<void (), std::shared_future<void> llvm::ThreadPoolInterface::asyncImpl<void>(std::function<void ()>, llvm::ThreadPoolTaskGroup*)::'lambda'()>::_M_invoke(std::_Any_data const&) DWARFRewriter.cpp:0:0
#63 0x0000564e0493f515 std::function<void ()>::operator()() const DWARFRewriter.cpp:0:0
#64 0x0000564e05360202 llvm::StdThreadPool::processTasks(llvm::ThreadPoolTaskGroup*) (/home/itrofimow/work/llvm-project/build/bin/llvm-bolt+0x362b202)
#65 0x0000564e05363cd5 llvm::StdThreadPool::grow(int)::$_0::operator()() const ThreadPool.cpp:0:0
#66 0x0000564e05363c59 auto void llvm::thread::GenericThreadProxy<std::tuple<llvm::StdThreadPool::grow(int)::$_0>>(void*)::'lambda'(auto&&, auto&&...)::operator()<llvm::StdThreadPool::grow(int)::$_0&>(auto&&, auto&&...) const ThreadPool.cpp:0:0
#67 0x0000564e05363c2d auto std::__invoke_impl<void, void llvm::thread::GenericThreadProxy<std::tuple<llvm::StdThreadPool::grow(int)::$_0>>(void*)::'lambda'(auto&&, auto&&...), llvm::StdThreadPool::grow(int)::$_0&>(std::__invoke_other, void llvm::thread::GenericThreadProxy<std::tuple<llvm::StdThreadPool::grow(int)::$_0>>(void*)::'lambda'(auto&&, auto&&...)&&, llvm::StdThreadPool::grow(int)::$_0&) ThreadPool.cpp:0:0
#68 0x0000564e05363bdd std::__invoke_result<auto, auto...>::type std::__invoke<void llvm::thread::GenericThreadProxy<std::tuple<llvm::StdThreadPool::grow(int)::$_0>>(void*)::'lambda'(auto&&, auto&&...), llvm::StdThreadPool::grow(int)::$_0&>(auto&&, auto&&...) ThreadPool.cpp:0:0
#69 0x0000564e05363bad decltype(auto) std::__apply_impl<void llvm::thread::GenericThreadProxy<std::tuple<llvm::StdThreadPool::grow(int)::$_0>>(void*)::'lambda'(auto&&, auto&&...), std::tuple<llvm::StdThreadPool::grow(int)::$_0>&, 0ul>(auto&&, std::tuple<llvm::StdThreadPool::grow(int)::$_0>&, std::integer_sequence<unsigned long, 0ul>) ThreadPool.cpp:0:0
#70 0x0000564e05363b3d decltype(auto) std::apply<void llvm::thread::GenericThreadProxy<std::tuple<llvm::StdThreadPool::grow(int)::$_0>>(void*)::'lambda'(auto&&, auto&&...), std::tuple<llvm::StdThreadPool::grow(int)::$_0>&>(auto&&, std::tuple<llvm::StdThreadPool::grow(int)::$_0>&) ThreadPool.cpp:0:0
#71 0x0000564e05363b0e void llvm::thread::GenericThreadProxy<std::tuple<llvm::StdThreadPool::grow(int)::$_0>>(void*) ThreadPool.cpp:0:0
#72 0x0000564e05363835 void* llvm::thread::ThreadProxy<std::tuple<llvm::StdThreadPool::grow(int)::$_0>>(void*) ThreadPool.cpp:0:0
#73 0x00007f4abd5ccac3 (/lib/x86_64-linux-gnu/libc.so.6+0x94ac3)
#74 0x00007f4abd65e850 (/lib/x86_64-linux-gnu/libc.so.6+0x126850)
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Aborted
for which I don't really care that much, but sharing with you guys anyway since I have the stacktrace symbolized.
I do care for the "BOLT is unable to proceed because it couldn't properly understand this function" error, however:
we at Perforator (https://github.com/yandex/perforator) are working on generating BOLT-profiles, and we've got it working with llvm-bolt-19,
but this error with llvm-bolt-20 is not only frightening, but also manifests itself with a lot of binaries we have, which blocks upgrading to llvm-20 for us.
There are some similar issues, but I've decided to open a separate one since I have more context here, probably.
After #117299 commit BOLT fails to create a profile for one of my binaries:
The offending function is from openssl1.1.1g: https://github.com/openssl/openssl/blob/e2e09d9fba1187f8d6aafaa34d4172f56f1ffb72/crypto/rc4/asm/rc4-x86_64.pl#L527
I assume it's some template language there in openssl repo, in its final form (at least what we have vendored) it looks like this
and it disassembles to
Also, BOLT fails to exit gracefully and crashes:
for which I don't really care that much, but sharing with you guys anyway since I have the stacktrace symbolized.
I do care for the "BOLT is unable to proceed because it couldn't properly understand this function" error, however:
we at Perforator (https://github.com/yandex/perforator) are working on generating BOLT-profiles, and we've got it working with llvm-bolt-19,
but this error with llvm-bolt-20 is not only frightening, but also manifests itself with a lot of binaries we have, which blocks upgrading to llvm-20 for us.
I would be happy to provide any additional info/cooperate on this, if needed