[llvm-bugs] [Bug 52150] New: fatal error: error in (BPF) backend: Could not match memory address. Inline asm failure!
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Oct 12 01:00:07 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=52150
Bug ID: 52150
Summary: fatal error: error in (BPF) backend: Could not match
memory address. Inline asm failure!
Product: clang
Version: 11.0
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C
Assignee: unassignedclangbugs at nondot.org
Reporter: mike at levo.ai
CC: blitzrakete at gmail.com, dgregor at apple.com,
erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
richard-llvm at metafoo.co.uk
Created attachment 25353
--> https://bugs.llvm.org/attachment.cgi?id=25353&action=edit
preprocessed source file
Clang 11, 12, and 13 all fail with the following error message when trying to
use extended asm in a BPF program.
Compiler output:
fatal error: error in backend: Could not match memory address. Inline asm
failure!
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: clang -Werror -O2 -target bpf -c -I/usr/include
-I../../cmake-build-debug/staging/include inline_bpf_asm_failure.c
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module
'inline_bpf_asm_failure.c'.
4. Running pass 'BPF DAG->DAG Pattern Instruction Selection' on function
'@bpf_prog'
#0 0x00007f63d449cf8f llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/usr/lib/x86_64-linux-gnu/libLLVM-11.so.1+0xbd0f8f)
#1 0x00007f63d449b2f0 llvm::sys::RunSignalHandlers()
(/usr/lib/x86_64-linux-gnu/libLLVM-11.so.1+0xbcf2f0)
#2 0x00007f63d449c6dd llvm::sys::CleanupOnSignal(unsigned long)
(/usr/lib/x86_64-linux-gnu/libLLVM-11.so.1+0xbd06dd)
#3 0x00007f63d43e0c4a (/usr/lib/x86_64-linux-gnu/libLLVM-11.so.1+0xb14c4a)
#4 0x00007f63d43e0beb (/usr/lib/x86_64-linux-gnu/libLLVM-11.so.1+0xb14beb)
#5 0x00007f63d4497dbe (/usr/lib/x86_64-linux-gnu/libLLVM-11.so.1+0xbcbdbe)
#6 0x00000000004134f2 (/usr/lib/llvm-11/bin/clang+0x4134f2)
#7 0x00007f63d43eccaf llvm::report_fatal_error(llvm::Twine const&, bool)
(/usr/lib/x86_64-linux-gnu/libLLVM-11.so.1+0xb20caf)
#8 0x00007f63d43ecb88 (/usr/lib/x86_64-linux-gnu/libLLVM-11.so.1+0xb20b88)
#9 0x00007f63d4b034e3 (/usr/lib/x86_64-linux-gnu/libLLVM-11.so.1+0x12374e3)
#10 0x00007f63d4b03b87 llvm::SelectionDAGISel::Select_INLINEASM(llvm::SDNode*)
(/usr/lib/x86_64-linux-gnu/libLLVM-11.so.1+0x1237b87)
#11 0x00007f63d5f31573 (/usr/lib/x86_64-linux-gnu/libLLVM-11.so.1+0x2665573)
#12 0x00007f63d4b010bf llvm::SelectionDAGISel::DoInstructionSelection()
(/usr/lib/x86_64-linux-gnu/libLLVM-11.so.1+0x12350bf)
#13 0x00007f63d4b00730 llvm::SelectionDAGISel::CodeGenAndEmitDAG()
(/usr/lib/x86_64-linux-gnu/libLLVM-11.so.1+0x1234730)
#14 0x00007f63d4affa52
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&)
(/usr/lib/x86_64-linux-gnu/libLLVM-11.so.1+0x1233a52)
#15 0x00007f63d4afd751
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&)
(/usr/lib/x86_64-linux-gnu/libLLVM-11.so.1+0x1231751)
#16 0x00007f63d47701ae
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
(/usr/lib/x86_64-linux-gnu/libLLVM-11.so.1+0xea41ae)
#17 0x00007f63d45ac059 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/usr/lib/x86_64-linux-gnu/libLLVM-11.so.1+0xce0059)
#18 0x00007f63d45b1603 llvm::FPPassManager::runOnModule(llvm::Module&)
(/usr/lib/x86_64-linux-gnu/libLLVM-11.so.1+0xce5603)
#19 0x00007f63d45ac670 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/usr/lib/x86_64-linux-gnu/libLLVM-11.so.1+0xce0670)
#20 0x00007f63da0196e6 clang::EmitBackendOutput(clang::DiagnosticsEngine&,
clang::HeaderSearchOptions const&, clang::CodeGenOptions const&,
clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout
const&, llvm::Module*, clang::BackendAction,
std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >)
(/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x164f6e6)
#21 0x00007f63da2d69f6 (/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x190c9f6)
#22 0x00007f63d93a1763 clang::ParseAST(clang::Sema&, bool, bool)
(/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x9d7763)
#23 0x00007f63da96d0c8 clang::FrontendAction::Execute()
(/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x1fa30c8)
#24 0x00007f63da923641
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x1f59641)
#25 0x00007f63da9d3200
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x2009200)
#26 0x00000000004131bf cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/usr/lib/llvm-11/bin/clang+0x4131bf)
#27 0x00000000004115fe (/usr/lib/llvm-11/bin/clang+0x4115fe)
#28 0x00007f63da656732 (/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x1c8c732)
#29 0x00007f63d43e0bcd
llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>)
(/usr/lib/x86_64-linux-gnu/libLLVM-11.so.1+0xb14bcd)
#30 0x00007f63da655c5f
clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>
>, std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >*, bool*) const
(/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x1c8bc5f)
#31 0x00007f63da62da7f
clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&,
clang::driver::Command const*&) const
(/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x1c63a7f)
#32 0x00007f63da62dc27
clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const
(/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x1c63c27)
#33 0x00007f63da64178c
clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&)
(/usr/lib/x86_64-linux-gnu/libclang-cpp.so.11+0x1c7778c)
#34 0x00000000004110a3 main (/usr/lib/llvm-11/bin/clang+0x4110a3)
#35 0x00007f63d3400d0a __libc_start_main ./csu/../csu/libc-start.c:308:16
#36 0x000000000040e89a _start (/usr/lib/llvm-11/bin/clang+0x40e89a)
clang: error: clang frontend command failed with exit code 70 (use -v to see
invocation)
Debian clang version 11.0.1-2
Target: bpf
Thread model: posix
InstalledDir: /usr/bin
clang: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/inline_bpf_asm_failure-d6e6d5.c
clang: note: diagnostic msg: /tmp/inline_bpf_asm_failure-d6e6d5.sh
clang: note: diagnostic msg:
********************
/tmp/inline_bpf_asm_failure-d6e6d5.sh Contents:
# Crash reproducer for Debian clang version 11.0.1-2
# Driver args: "-Werror" "-O2" "--target=bpf" "-c" "-I" "/usr/include" "-I"
"../../cmake-build-debug/staging/include" "inline_bpf_asm_failure.c"
# Original command: "/usr/lib/llvm-11/bin/clang" "-cc1" "-triple" "bpf"
"-emit-obj" "-disable-free" "-disable-llvm-verifier" "-discard-value-names"
"-main-file-name" "inline_bpf_asm_failure.c" "-mrelocation-model" "static"
"-mframe-pointer=all" "-fmath-errno" "-fno-rounding-math"
"-mconstructor-aliases" "-fno-split-dwarf-inlining" "-debugger-tuning=gdb"
"-resource-dir" "/usr/lib/llvm-11/lib/clang/11.0.1" "-I" "/usr/include" "-I"
"../../cmake-build-debug/staging/include" "-O2" "-Werror"
"-fdebug-compilation-dir" "/home/mikep/levoai/ebpf_sensor/scratch/c"
"-ferror-limit" "19" "-fgnuc-version=4.2.1" "-fcolor-diagnostics"
"-vectorize-loops" "-vectorize-slp" "-faddrsig" "-o" "inline_bpf_asm_failure.o"
"-x" "c" "inline_bpf_asm_failure.c"
"/usr/lib/llvm-11/bin/clang" "-cc1" "-triple" "bpf" "-emit-obj"
"-disable-free" "-disable-llvm-verifier" "-discard-value-names"
"-main-file-name" "inline_bpf_asm_failure.c" "-mrelocation-model" "static"
"-mframe-pointer=all" "-fmath-errno" "-fno-rounding-math"
"-mconstructor-aliases" "-fno-split-dwarf-inlining" "-debugger-tuning=gdb"
"-O2" "-Werror" "-ferror-limit" "19" "-fgnuc-version=4.2.1"
"-fcolor-diagnostics" "-vectorize-loops" "-vectorize-slp" "-faddrsig" "-x" "c"
"inline_bpf_asm_failure-d6e6d5.c"
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20211012/87b27738/attachment-0001.html>
More information about the llvm-bugs
mailing list