<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/65152>65152</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
ARM: Clang 17.x crash in libdeflate
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
kraj
</td>
</tr>
</table>
<pre>
Attach test case is a new crash seen with clang 17.x branch as compared to 16.x where it works ok.
```
| 1. <eof> parser at end of file
| 2. Code generation
| 3. Running pass 'Function Pass Manager' on module '/mnt/jenkins/workspace/Yocto-world-arm/build/tmp/work/cortexa15t2hf-neon-yoe-linux-gnueabi/libdeflate/1.18/git/lib/crc32.c'.
| 4. Running pass 'ARM Instruction Selection' on function '@__crc32b'
| Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
| 0 libLLVM-17.so 0x00007f7f23d649b4 llvm::sys::RunSignalHandlers() + 52
| 1 libLLVM-17.so 0x00007f7f23c9a877 llvm::CrashRecoveryContext::HandleExit(int) + 87
| 2 libLLVM-17.so 0x00007f7f23d5f782 llvm::sys::Process::Exit(int, bool) + 34
| 3 arm-yoe-linux-gnueabi-clang 0x00005651d0c708fd
| 4 libLLVM-17.so 0x00007f7f23cac1d3 llvm::report_fatal_error(llvm::Twine const&, bool) + 115
| 5 libLLVM-17.so 0x00007f7f246d9d86 llvm::SelectionDAGISel::CannotYetSelect(llvm::SDNode*) + 422
| 6 libLLVM-17.so 0x00007f7f246ddbef llvm::SelectionDAGISel::SelectCodeCommon(llvm::SDNode*, unsigned char const*, unsigned int) + 10527
| 7 libLLVM-17.so 0x00007f7f26699fe5
| 8 libLLVM-17.so 0x00007f7f246d7b66 llvm::SelectionDAGISel::DoInstructionSelection() + 486
| 9 libLLVM-17.so 0x00007f7f246e245d llvm::SelectionDAGISel::CodeGenAndEmitDAG() + 973
| 10 libLLVM-17.so 0x00007f7f246e49c0 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) + 3536
| 11 libLLVM-17.so 0x00007f7f246e6456 llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) + 1206
| 12 libLLVM-17.so 0x00007f7f266a33f8
| 13 libLLVM-17.so 0x00007f7f241890c3 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 419
| 14 libLLVM-17.so 0x00007f7f23ec086d llvm::FPPassManager::runOnFunction(llvm::Function&) + 829
| 15 libLLVM-17.so 0x00007f7f23ec0a8b llvm::FPPassManager::runOnModule(llvm::Module&) + 59
| 16 libLLVM-17.so 0x00007f7f23ec1209 llvm::legacy::PassManagerImpl::run(llvm::Module&) + 1065
| 17 libclang-cpp.so.17 0x00007f7f2bebb86a clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>) + 5050
| 18 libclang-cpp.so.17 0x00007f7f2c2999c8
| 19 libclang-cpp.so.17 0x00007f7f2ad880ed clang::ParseAST(clang::Sema&, bool, bool) + 1197
| 20 libclang-cpp.so.17 0x00007f7f2caf83b9 clang::FrontendAction::Execute() + 185
| 21 libclang-cpp.so.17 0x00007f7f2ca85fe5 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 293
| 22 libclang-cpp.so.17 0x00007f7f2cb6ff08 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 920
| 23 arm-yoe-linux-gnueabi-clang 0x00005651d0c7230c cc1_main(llvm::ArrayRef<char const*>, char const*, void*) + 4332
| 24 arm-yoe-linux-gnueabi-clang 0x00005651d0c6de36
| 25 libclang-cpp.so.17 0x00007f7f2c73ee6d
| 26 libLLVM-17.so 0x00007f7f23c9a767 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) + 39
| 27 libclang-cpp.so.17 0x00007f7f2c7414a2 clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const + 322
| 28 libclang-cpp.so.17 0x00007f7f2c706e6e clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const + 174
| 29 libclang-cpp.so.17 0x00007f7f2c707631 clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const + 129
| 30 libclang-cpp.so.17 0x00007f7f2c71765c clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) + 332
| 31 arm-yoe-linux-gnueabi-clang 0x00005651d0c6f407 clang_main(int, char**, llvm::ToolContext const&) + 4263
| 32 arm-yoe-linux-gnueabi-clang 0x00005651d0c6a2c3 main + 51
| 33 libc.so.6 0x00007f7f22a23efb
| 34 libc.so.6 0x00007f7f22a23fb9 __libc_start_main + 137
| 35 arm-yoe-linux-gnueabi-clang 0x00005651d0c6a305 _start + 37
| arm-yoe-linux-gnueabi-clang: error: clang frontend command failed with exit code 70 (use -v to see invocation)
| clang version 17.0.0 (https://github.com/llvm/llvm-project 45c677d8c62b731df617181e5019316d0b2e1820)
| Target: arm-yoe-linux-gnueabi
| Thread model: posix
| InstalledDir: /mnt/jenkins/workspace/Yocto-world-arm/build/tmp/work/cortexa15t2hf-neon-yoe-linux-gnueabi/libdeflate/1.18/recipe-sysroot-native/usr/bin/arm-yoe-linux-gnueabi
```
[test.zip](https://github.com/llvm/llvm-project/files/12489902/test.zip)
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzEWc1u4zgSfhrlQtgQqf9DDo4Tz_Sgs91IGgPMXgyKLNmcSKSXpJx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