<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/57598>57598</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
fatal error: error in backend: Incorrect flag for llvm.bpf.preserve.type.info intrinsic
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
vincentmli
</td>
</tr>
</table>
<pre>
Hi
I cloned https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git, compile and installed the bpf-next kernel, then when compiling bpf selftest, but got error
```
[root@centos-dev bpf]# make
CLNG-BPF [test_maps] test_core_reloc_kernel.bpf.o
fatal error: error in backend: Incorrect flag for llvm.bpf.preserve.type.info intrinsic
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: clang -g -Werror -D__TARGET_ARCH_x86 -mlittle-endian -I/usr/src/bpf-next/tools/testing/selftests/bpf/tools/include -I/usr/src/bpf-next/tools/testing/selftests/bpf -I/usr/src/bpf-next/tools/include/uapi -I/usr/src/bpf-next/tools/testing/selftests/usr/include -idirafter /usr/local/lib/clang/15.0.0/include -idirafter /usr/local/include -idirafter /usr/include -Wno-compare-distinct-pointer-types -DENABLE_ATOMICS_TESTS -O2 -target bpf -c progs/test_core_reloc_kernel.c -mcpu=v3 -o /usr/src/bpf-next/tools/testing/selftests/bpf/test_core_reloc_kernel.bpf.o
1. <eof> parser at end of file
2. Optimizer
#0 0x0000000001c825cc llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/usr/local/bin/clang-15+0x1c825cc)
#1 0x0000000001c8071c llvm::sys::RunSignalHandlers() (/usr/local/bin/clang-15+0x1c8071c)
#2 0x0000000001c80c59 llvm::sys::CleanupOnSignal(unsigned long) (/usr/local/bin/clang-15+0x1c80c59)
#3 0x0000000001bf3947 llvm::CrashRecoveryContext::HandleExit(int) (/usr/local/bin/clang-15+0x1bf3947)
#4 0x0000000001c79d7e llvm::sys::Process::Exit(int, bool) (/usr/local/bin/clang-15+0x1c79d7e)
#5 0x0000000000a275cb (/usr/local/bin/clang-15+0xa275cb)
#6 0x0000000001bf95bc llvm::report_fatal_error(llvm::Twine const&, bool) (/usr/local/bin/clang-15+0x1bf95bc)
#7 0x0000000001bf9728 (/usr/local/bin/clang-15+0x1bf9728)
#8 0x0000000000a58c8e (anonymous namespace)::BPFAbstractMemberAccess::IsPreserveDIAccessIndexCall(llvm::CallInst const*, (anonymous namespace)::BPFAbstractMemberAccess::CallInfo&) (.isra.280) BPFAbstractMemberAccess.cpp:0:0
#9 0x0000000000a5ddd5 (anonymous namespace)::BPFAbstractMemberAccess::run(llvm::Function&) (.constprop.380) BPFAbstractMemberAccess.cpp:0:0
#10 0x0000000000a5e1e3 llvm::BPFAbstractMemberAccessPass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/usr/local/bin/clang-15+0xa5e1e3)
#11 0x0000000000a362ad llvm::detail::PassModel<llvm::Function, llvm::BPFAbstractMemberAccessPass, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/usr/local/bin/clang-15+0xa362ad)
#12 0x0000000000a42f6b llvm::detail::PassModel<llvm::Function, llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (/usr/local/bin/clang-15+0xa42f6b)
#13 0x000000000154ec9a llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/usr/local/bin/clang-15+0x154ec9a)
#14 0x0000000000a3637d llvm::detail::PassModel<llvm::Module, llvm::ModuleToFunctionPassAdaptor, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/usr/local/bin/clang-15+0xa3637d)
#15 0x000000000154bff2 llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (/usr/local/bin/clang-15+0x154bff2)
#16 0x0000000001f6cada (anonymous namespace)::EmitAssemblyHelper::RunOptimizationPipeline(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>&, std::unique_ptr<llvm::ToolOutputFile, std::default_delete<llvm::ToolOutputFile>>&) (.constprop.832) BackendUtil.cpp:0:0
#17 0x0000000001f6f3c6 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>) (/usr/local/bin/clang-15+0x1f6f3c6)
#18 0x0000000002afa691 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/usr/local/bin/clang-15+0x2afa691)
#19 0x00000000035bc101 clang::ParseAST(clang::Sema&, bool, bool) (/usr/local/bin/clang-15+0x35bc101)
#20 0x0000000002af9da5 clang::CodeGenAction::ExecuteAction() (/usr/local/bin/clang-15+0x2af9da5)
#21 0x0000000002579689 clang::FrontendAction::Execute() (/usr/local/bin/clang-15+0x2579689)
#22 0x0000000002515b1b clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/usr/local/bin/clang-15+0x2515b1b)
#23 0x0000000002633773 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/usr/local/bin/clang-15+0x2633773)
#24 0x0000000000a28a34 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/usr/local/bin/clang-15+0xa28a34)
#25 0x0000000000a25abb ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) driver.cpp:0:0
#26 0x00000000023cb005 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const::'lambda'()>(long) Job.cpp:0:0
#27 0x0000000001bf3803 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/usr/local/bin/clang-15+0x1bf3803)
#28 0x00000000023cb86e clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*, bool*) const (.part.216) Job.cpp:0:0
#29 0x000000000239f537 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&) const (/usr/local/bin/clang-15+0x239f537)
#30 0x000000000239fe83 clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) const (/usr/local/bin/clang-15+0x239fe83)
#31 0x00000000023ac2f9 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (/usr/local/bin/clang-15+0x23ac2f9)
#32 0x00000000009ab13b main (/usr/local/bin/clang-15+0x9ab13b)
#33 0x00007f43d8623493 __libc_start_main (/lib64/libc.so.6+0x23493)
#34 0x0000000000a2567e _start (/usr/local/bin/clang-15+0xa2567e)
clang-15: error: clang frontend command failed with exit code 70 (use -v to see invocation)
clang version 15.0.0 (https://github.com/llvm/llvm-project.git e91a73de24d60954700d7ac0293c050ab2cbe90b)
Target: bpf
Thread model: posix
InstalledDir: /usr/local/bin
clang-15: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-15: note: diagnostic msg: /tmp/test_core_reloc_kernel-b480b4.c
clang-15: note: diagnostic msg: /tmp/test_core_reloc_kernel-b480b4.sh
clang-15: note: diagnostic msg:
********************
make: *** [Makefile:522: /usr/src/bpf-next/tools/testing/selftests/bpf/test_core_reloc_kernel.bpf.o] Error 70
[test_core_reloc_kernel-b480b4.c.txt](https://github.com/llvm/llvm-project/files/9503087/test_core_reloc_kernel-b480b4.c.txt)
[test_core_reloc_kernel-b480b4.sh.txt](https://github.com/llvm/llvm-project/files/9503088/test_core_reloc_kernel-b480b4.sh.txt)
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzlWltz4joS_jXkRQXlC7bxQx48hEyylZmkArPz6JJlmWjHt5XkTHJ-_bYkAxYhCWTmnDq7O8UQkKXur7_ullpCWZM_n18xNHIuRk5i3q8RKZua5uhBylaM_GTkXcJrzeTkB-U1LScNX0ND22XwLkgF7yWruyf4azqY3vCetYV5H9f0SU504xyRpmpZSRGuc8RqIXFZgjb5QNGmJ9rImavmGv1Ub2YYq9eqGxK0LCQVWmDWSbRuJKKcN3xoyih0-pf5GnziTSNHU4fQWjZinNNHJWwUXIw8H1X4BzUdEZrffP08_nR3iWCMUpNWGLgILpD-QhpOU07LhqQ9JSBl0pjBBQaLeix-Yj6AnSjD5Aetc9V2XYMETolERYnXqIAOZflYaSktp4LyRzqRzy2dsLpoYLDkQBQjRsHdzSJZLpDosopJhMH8NeK0bbhEsnnptYcumwB3ykugo_8zbnnzLwAAX5kQHRXwoXcIKbucancQjsWDxi05JlRRDehgJKFCgMtE03HTrEZiIRrCsIQHvKuRIJy1cmIgLyUIQXlXtQqZbnLgUXzHmzXHFcJ83VXgEwUcwg-Dk8fw-m7IG1-k6Sq5_7xYpcn9_Cp9moVoXJVMypKOgVKGazS-Bgs6wVVIcjKIOvgom6ZUBirfQfyoLn30iG2Qbvps7P8leUeN7jWpjrhlv6DQDNoCZznjGB5ytH0GgYpLnaYqZTW_8NcNJs7EOXLoW322z77XzVilKeZ0nDOFlchx20D8Uj5W8SzAl4uvyaebRZqsbr9cz5fparFcLdH41kNjCWFApU7vMYFQa9Ybow9kHIEQIG038i8efTRu0EfZ693_blq7Kl5H_pw2xchfILA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