Issue 61514
Summary Clang is failing compilation of linux kernel
Labels
Assignees
Reporter NeroReflex
    I often encounter random crashes while compiling software. The following is an example of that. Sometimes re-launching compilation makes the process work. This time I have decided to report the issue as it was asked by the software. You can find below the stack trace along the error output. I also attached the files that the compiler asked to attach.

[bug_report.zip](https://github.com/llvm/llvm-project/files/11011252/bug_report.zip)

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/bin/clang -Qunused-arguments -fmacro-prefix-map=./= -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Wno-format-security -funsigned-char -std=gnu11 --target=x86_64-linux-gnu -fintegrated-as -Werror=unknown-warning-option -Werror=ignored-optimization-argument -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -mno-avx2 -mno-avx512f -O3 -fcf-protection=none -m64 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mstack-alignment=8 -mskip-rax-setup -mno-red-zone -mcmodel=kernel -Wno-sign-compare -fno-asynchronous-unwind-tables -mretpoline-external-thunk -mfunction-return=thunk-extern -mharden-sls=all -fno-delete-null-pointer-checks -Wno-frame-address -Wno-address-of-packed-member -mtune=generic -O2 -Wframe-larger-than=1024 -fstack-protector-strong -Wno-gnu -Wno-unused-but-set-variable -Wno-unused-const-variable -fomit-frame-pointer -fno-stack-clash-protection -fno-lto -flto=thin -fsplit-lto-unit -fvisibility=hidden -falign-functions=16 -Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wcast-function-type -Wimplicit-fallthrough -fno-tree-vectorize -fno-strict-overflow -fno-stack-check -Werror=date-time -Werror=incompatible-pointer-types -Wno-initializer-overrides -Wno-format -Wformat-extra-args -Wformat-invalid-specifier -Wformat-zero-length -Wnonnull -Wformat-insufficient-args -Wno-sign-compare -Wno-pointer-to-enum-cast -Wno-tautological-constant-out-of-range-compare -Wno-unaligned-access -nostdinc -I./arch/x86/include -I./arch/x86/include/generated -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/compiler-version.h -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -DMODULE -DKBUILD_BASENAME=\"verbs\" -DKBUILD_MODNAME=\"irdma\" -D__KBUILD_MODNAME=kmod_irdma -c -Wp,-MMD,drivers/infiniband/hw/irdma/.verbs.o.d -fcolor-diagnostics -o drivers/infiniband/hw/irdma/verbs.o drivers/infiniband/hw/irdma/verbs.c
1. ./include/linux/netdevice.h:461:1: current parser token '{'
 #0 0x00007f327d97baaa (/usr/lib/libLLVM-15.so+0xd7baaa)
 #1 0x00007f327d97913f llvm::sys::RunSignalHandlers() (/usr/lib/libLLVM-15.so+0xd7913f)
 #2 0x00007f327d85c4a9 (/usr/lib/libLLVM-15.so+0xc5c4a9)
 #3 0x00007f327c651f50 (/usr/lib/libc.so.6+0x38f50)
 #4 0x00007f327d87c462 llvm::FoldingSetBase::GrowBucketCount(unsigned int, llvm::FoldingSetBase::FoldingSetInfo const&) (/usr/lib/libLLVM-15.so+0xc7c462)
 #5 0x00007f327d87c6f5 llvm::FoldingSetBase::InsertNode(llvm::FoldingSetBase::Node*, void*, llvm::FoldingSetBase::FoldingSetInfo const&) (/usr/lib/libLLVM-15.so+0xc7c6f5)
 #6 0x00007f3284f27433 clang::ASTContext::getFunctionTypeInternal(clang::QualType, llvm::ArrayRef<clang::QualType>, clang::FunctionProtoType::ExtProtoInfo const&, bool) const (/usr/lib/libclang-cpp.so.15+0x927433)
 #7 0x00007f3284f2715a clang::ASTContext::getFunctionTypeInternal(clang::QualType, llvm::ArrayRef<clang::QualType>, clang::FunctionProtoType::ExtProtoInfo const&, bool) const (/usr/lib/libclang-cpp.so.15+0x92715a)
 #8 0x00007f3285b54699 (/usr/lib/libclang-cpp.so.15+0x1554699)
 #9 0x00007f3285b581b0 clang::Sema::GetTypeForDeclarator(clang::Declarator&, clang::Scope*) (/usr/lib/libclang-cpp.so.15+0x15581b0)
#10 0x00007f328568471e clang::Sema::HandleDeclarator(clang::Scope*, clang::Declarator&, llvm::MutableArrayRef<clang::TemplateParameterList*>) (/usr/lib/libclang-cpp.so.15+0x108471e)
#11 0x00007f3285698d8d clang::Sema::ActOnStartOfFunctionDef(clang::Scope*, clang::Declarator&, llvm::MutableArrayRef<clang::TemplateParameterList*>, clang::Sema::SkipBodyInfo*, clang::Sema::FnBodyKind) (/usr/lib/libclang-cpp.so.15+0x1098d8d)
#12 0x00007f3284ef8644 clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&, clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*) (/usr/lib/libclang-cpp.so.15+0x8f8644)
#13 0x00007f3284e76613 clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, clang::DeclaratorContext, clang::ParsedAttributes&, clang::SourceLocation*, clang::Parser::ForRangeInit*) (/usr/lib/libclang-cpp.so.15+0x876613)
#14 0x00007f3284ee71c2 (/usr/lib/libclang-cpp.so.15+0x8e71c2)
#15 0x00007f3284efcf5c clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&, clang::ParsingDeclSpec*) (/usr/lib/libclang-cpp.so.15+0x8fcf5c)
#16 0x00007f3284efd340 clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, clang::Sema::ModuleImportState&) (/usr/lib/libclang-cpp.so.15+0x8fd340)
#17 0x00007f3284e49009 clang::ParseAST(clang::Sema&, bool, bool) (/usr/lib/libclang-cpp.so.15+0x849009)
#18 0x00007f32864ee109 clang::FrontendAction::Execute() (/usr/lib/libclang-cpp.so.15+0x1eee109)
#19 0x00007f3286493b8f clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/usr/lib/libclang-cpp.so.15+0x1e93b8f)
#20 0x00007f3286558cca clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/usr/lib/libclang-cpp.so.15+0x1f58cca)
#21 0x000055b70a01a4d0 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/usr/bin/clang+0x104d0)
#22 0x000055b70a020177 (/usr/bin/clang+0x16177)
#23 0x00007f32861dc319 (/usr/lib/libclang-cpp.so.15+0x1bdc319)
#24 0x00007f327d85c577 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/usr/lib/libLLVM-15.so+0xc5c577)
#25 0x00007f32861e1e0f (/usr/lib/libclang-cpp.so.15+0x1be1e0f)
#26 0x00007f32861a556e clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/usr/lib/libclang-cpp.so.15+0x1ba556e)
#27 0x00007f32861a592d clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) const (/usr/lib/libclang-cpp.so.15+0x1ba592d)
#28 0x00007f32861fea1c clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) (/usr/lib/libclang-cpp.so.15+0x1bfea1c)
#29 0x000055b70a0227d9 clang_main(int, char**) (/usr/bin/clang+0x187d9)
#30 0x00007f327c63c790 (/usr/lib/libc.so.6+0x23790)
#31 0x00007f327c63c84a __libc_start_main (/usr/lib/libc.so.6+0x2384a)
#32 0x000055b70a016d25 _start (/usr/bin/clang+0xcd25)
clang-15: error: clang frontend command failed with exit code 139 (use -v to see invocation)
clang version 15.0.7
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/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/verbs-8ef013.c
clang-15: note: diagnostic msg: /tmp/verbs-8ef013.sh
clang-15: note: diagnostic
 msg:

********************
make[5]: *** [scripts/Makefile.build:252: drivers/infiniband/hw/irdma/verbs.o] Error 1
make[5]: *** Attesa per i processi non terminati....
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to