Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clang: error: unable to execute command: Segmentation fault bug report #96695

Closed
keng420 opened this issue Jun 25, 2024 · 2 comments
Closed

clang: error: unable to execute command: Segmentation fault bug report #96695

keng420 opened this issue Jun 25, 2024 · 2 comments
Labels
crash Prefer [crash-on-valid] or [crash-on-invalid] mc Machine (object) code obsolete Issues with old (unsupported) versions of LLVM

Comments

@keng420
Copy link

keng420 commented Jun 25, 2024

Wile compiling code for matrix matrix multiplication on a raspberry pi 3 I got an error massage asking to file a bug report. So here it is.

I also added the original program code if it helps.

compile command:

clang  -fopenmp -O3 matrix_multiplication.c -o matrix_multiplication

output:

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: /usr/lib/llvm-14/bin/clang -cc1 -triple aarch64-unknown-linux-gnu -emit-obj --mrelax-relocations -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name matrix_multiplication.c -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=non-leaf -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu generic -target-feature +neon -target-feature +v8a -target-abi aapcs -fallow-half-arguments-and-returns -mllvm -treat-scalable-fixed-error-as-warning -debugger-tuning=gdb -fcoverage-compilation-dir=/home/marwin/Documents/task1 -resource-dir /usr/lib/llvm-14/lib/clang/14.0.6 -internal-isystem /usr/lib/llvm-14/lib/clang/14.0.6/include -internal-isystem /usr/local/include -internal-isystem /usr/bin/../lib/gcc/aarch64-linux-gnu/12/../../../../aarch64-linux-gnu/include -internal-externc-isystem /usr/include/aarch64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -O3 -fdebug-compilation-dir=/home/marwin/Documents/task1 -ferror-limit 19 -fopenmp -fopenmp-target-new-runtime -fno-signed-char -fgnuc-version=4.2.1 -fcolor-diagnostics -vectorize-loops -vectorize-slp -target-feature +outline-atomics -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /tmp/matrix_multiplication-b2a1fc.o -x c matrix_multiplication.c
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module 'matrix_multiplication.c'.
4.      Running pass 'AArch64 Assembly Printer' on function '@reorganize'
#0 0x0000007f8d4ae4dc llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/lib/aarch64-linux-gnu/libLLVM-14.so.1+0xe9e4dc)
#1 0x0000007f8d4ac4b4 llvm::sys::RunSignalHandlers() (/lib/aarch64-linux-gnu/libLLVM-14.so.1+0xe9c4b4)
#2 0x0000007f8d4aea9c (/lib/aarch64-linux-gnu/libLLVM-14.so.1+0xe9ea9c)
#3 0x0000007f95d267b0 (linux-vdso.so.1+0x7b0)
#4 0x0000007f8d93a9f0 (/lib/aarch64-linux-gnu/libLLVM-14.so.1+0x132a9f0)
#5 0x0000007f8d48b49c llvm::raw_ostream::write(char const*, unsigned long) (/lib/aarch64-linux-gnu/libLLVM-14.so.1+0xe7b49c)
#6 0x0000007f8e841048 llvm::MCContext::createTempSymbol(llvm::Twine const&, bool) (/lib/aarch64-linux-gnu/libLLVM-14.so.1+0x2231048)
#7 0x0000007f8e8413f0 llvm::MCContext::createTempSymbol() (/lib/aarch64-linux-gnu/libLLVM-14.so.1+0x22313f0)
#8 0x0000007f8e865c6c llvm::MCObjectStreamer::emitCFIEndProcImpl(llvm::MCDwarfFrameInfo&) (/lib/aarch64-linux-gnu/libLLVM-14.so.1+0x2255c6c)
#9 0x0000007f8dc6f4c0 (/lib/aarch64-linux-gnu/libLLVM-14.so.1+0x165f4c0)
#10 0x0000007f8dc50b6c llvm::AsmPrinter::emitFunctionBody() (/lib/aarch64-linux-gnu/libLLVM-14.so.1+0x1640b6c)
#11 0x0000007f8ed74ba4 (/lib/aarch64-linux-gnu/libLLVM-14.so.1+0x2764ba4)
#12 0x0000007f8d80122c llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/lib/aarch64-linux-gnu/libLLVM-14.so.1+0x11f122c)
#13 0x0000007f8d5e4390 llvm::FPPassManager::runOnFunction(llvm::Function&) (/lib/aarch64-linux-gnu/libLLVM-14.so.1+0xfd4390)
#14 0x0000007f8d5eaf70 llvm::FPPassManager::runOnModule(llvm::Module&) (/lib/aarch64-linux-gnu/libLLVM-14.so.1+0xfdaf70)
#15 0x0000007f8d5e4d98 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/lib/aarch64-linux-gnu/libLLVM-14.so.1+0xfd4d98)
#16 0x0000007f940ec680 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> >) (/lib/aarch64-linux-gnu/libclang-cpp.so.14+0x184c680)
#17 0x0000007f943a6f20 (/lib/aarch64-linux-gnu/libclang-cpp.so.14+0x1b06f20)
#18 0x0000007f932e6f1c clang::ParseAST(clang::Sema&, bool, bool) (/lib/aarch64-linux-gnu/libclang-cpp.so.14+0xa46f1c)
#19 0x0000007f94ca4444 clang::FrontendAction::Execute() (/lib/aarch64-linux-gnu/libclang-cpp.so.14+0x2404444)
#20 0x0000007f94c17d28 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/lib/aarch64-linux-gnu/libclang-cpp.so.14+0x2377d28)
#21 0x0000007f94d17d20 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/lib/aarch64-linux-gnu/libclang-cpp.so.14+0x2477d20)
#22 0x0000000000413608 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/usr/lib/llvm-14/bin/clang+0x413608)
#23 0x0000000000411df4 (/usr/lib/llvm-14/bin/clang+0x411df4)
#24 0x0000000000411964 main (/usr/lib/llvm-14/bin/clang+0x411964)
#25 0x0000007f8c187780 __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:74:3
#26 0x0000007f8c187858 call_init ./csu/../csu/libc-start.c:128:20
#27 0x0000007f8c187858 __libc_start_main ./csu/../csu/libc-start.c:347:5
#28 0x000000000040eef0 _start (/usr/lib/llvm-14/bin/clang+0x40eef0)
clang: error: unable to execute command: Segmentation fault
clang: error: clang frontend command failed due to signal (use -v to see invocation)
Debian clang version 14.0.6
Target: aarch64-unknown-linux-gnu
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/matrix_multiplication-4362d5.c
clang: note: diagnostic msg: /tmp/matrix_multiplication-4362d5.sh
clang: note: diagnostic msg: 


********************

matrix_multiplication.zip

@github-actions github-actions bot added the clang Clang issues not falling into any other category label Jun 25, 2024
@EugeneZelenko EugeneZelenko added mc Machine (object) code crash Prefer [crash-on-valid] or [crash-on-invalid] and removed clang Clang issues not falling into any other category labels Jun 25, 2024
@asl asl added the obsolete Issues with old (unsupported) versions of LLVM label Jun 25, 2024
@asl
Copy link
Collaborator

asl commented Jun 25, 2024

@keng420 Does the problem reproduce with a bit more recent version of LLVM? E.g. LLVM 18?

@keng420
Copy link
Author

keng420 commented Jun 26, 2024

No the problem does not reproduce in LLVM 18 and previously it was a problem with including arm_neon.h .

Thanks for the help.

@EugeneZelenko EugeneZelenko closed this as not planned Won't fix, can't repro, duplicate, stale Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash Prefer [crash-on-valid] or [crash-on-invalid] mc Machine (object) code obsolete Issues with old (unsupported) versions of LLVM
Projects
None yet
Development

No branches or pull requests

3 participants