Crash in Sema::CheckImplicitConversion when using clangd
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
I[14:32:59.102] Ubuntu clangd version 21.1.8 (6ubuntu1)
I[14:32:59.102] Features: linux+grpc
I[14:32:59.102] PID: 2753
I[14:32:59.102] Working directory: /data/linux-source-7.0.0
I[14:32:59.102] argv[0]: /usr/bin/clangd
I[14:32:59.102] Starting LSP over stdin/stdout
I[14:32:59.103] <-- initialize(0)
I[14:32:59.110] --> reply:initialize(0) 6 ms
I[14:32:59.190] <-- initialized
I[14:32:59.250] <-- textDocument/didOpen
I[14:32:59.295] <-- textDocument/codeAction(1)
I[14:32:59.315] <-- $/cancelRequest
I[14:32:59.315] <-- textDocument/codeAction(2)
I[14:32:59.315] <-- textDocument/inlayHint(3)
I[14:32:59.327] <-- textDocument/documentLink(4)
I[14:32:59.489] <-- textDocument/foldingRange(5)
I[14:32:59.497] --> reply:textDocument/foldingRange(5) 8 ms
I[14:32:59.619] <-- textDocument/documentSymbol(6)
I[14:32:59.620] <-- textDocument/semanticTokens/full(7)
I[14:32:59.668] <-- $/cancelRequest
I[14:32:59.669] <-- textDocument/inlayHint(8)
I[14:32:59.696] Loaded compilation database from /data/linux-source-7.0.0/compile_commands.json
I[14:32:59.698] ASTWorker building file /data/linux-source-7.0.0/fs/file.c version 1 with command
[/data/linux-source-7.0.0]
/usr/bin/gcc -Wp,-MMD,fs/.file.o.d -nostdinc -I./arch/arm64/include -I./arch/arm64/include/generated -I./include -I./include -I./arch/arm64/include/uapi -I./arch/arm64/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/compiler-version.h -include ./include/linux/kconfig.h -I./ubuntu/include -include ./include/linux/compiler_types.h -D__KERNEL__ -mlittle-endian -DCC_USING_PATCHABLE_FUNCTION_ENTRY -DKASAN_SHADOW_SCALE_SHIFT= -std=gnu11 -fshort-wchar -funsigned-char -fno-common -fno-PIE -fno-strict-aliasing -mgeneral-regs-only -DCONFIG_CC_HAS_K_CONSTRAINT=1 -Wno-psabi --target=mips64-linux-gnuabi64 -fno-asynchronous-unwind-tables -fno-unwind-tables -mbranch-protection=pac-ret -Wa,-march=armv8.5-a "-DARM64_ASM_ARCH=\"armv8.5-a\"" -ffixed-x18 -DKASAN_SHADOW_SCALE_SHIFT= -fno-delete-null-pointer-checks -O2 -fno-allow-store-data-races -fstack-protector-strong -fno-omit-frame-pointer -fno-optimize-sibling-calls -ftrivial-auto-var-init=zero -fzero-init-padding-bits=all -fno-stack-clash-protection -fzero-call-used-regs=used-gpr -fpatchable-function-entry=4,2 -fsanitize=shadow-call-stack -fmin-function-alignment=8 -fstrict-flex-arrays=3 -fms-extensions -fno-strict-overflow -fno-stack-check -fconserve-stack -fno-builtin-wcslen -Wall -Wextra -Wundef -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Werror=strict-prototypes -Wno-format-security -Wno-trigraphs -Wno-frame-address -Wno-address-of-packed-member -Wmissing-declarations -Wmissing-prototypes -Wframe-larger-than=1024 -Wno-main -Wno-type-limits -Wno-dangling-pointer -Wvla-larger-than=1 -Wno-pointer-sign -Wcast-function-type -Wno-unterminated-string-initialization -Wno-array-bounds -Wno-stringop-overflow -Wno-alloc-size-larger-than -Wimplicit-fallthrough=5 -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -Wenum-conversion -Wunused -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-packed-not-aligned -Wno-format-overflow -Wno-format-truncation -Wno-stringop-truncation -Wno-override-init -Wno-missing-field-initializers -Wno-shift-negative-value -Wno-maybe-uninitialized -Wno-sign-compare -Wno-unused-parameter -g -gdwarf-5 -mstack-protector-guard=sysreg -mstack-protector-guard-reg=sp_el0 -mstack-protector-guard-offset=1912 -fsanitize=bounds-strict -fsanitize=shift -fsanitize=bool -fsanitize=enum "-DKBUILD_MODFILE=\"fs/file\"" "-DKBUILD_BASENAME=\"file\"" "-DKBUILD_MODNAME=\"file\"" -D__KBUILD_MODNAME=file -c -o fs/file.o -resource-dir=/usr/lib/llvm-21/lib/clang/21 -- /data/linux-source-7.0.0/fs/file.c
I[14:32:59.712] --> textDocument/clangd.fileStatus
I[14:32:59.841] --> window/workDoneProgress/create(0)
I[14:32:59.841] Enqueueing 22050 commands for indexing
I[14:32:59.861] <-- reply(0)
I[14:32:59.861] --> $/progress
I[14:32:59.861] --> $/progress
I[14:32:59.914] <-- $/cancelRequest
I[14:32:59.914] <-- textDocument/inlayHint(9)
I[14:33:00.668] Built preamble of size 25812852 for file /data/linux-source-7.0.0/fs/file.c version 1 in 0.94 seconds
I[14:33:00.669] --> workspace/semanticTokens/refresh(1)
I[14:33:00.670] <-- reply(1)
I[14:33:00.832] --> textDocument/publishDiagnostics
I[14:33:00.832] --> textDocument/inactiveRegions
I[14:33:00.840] --> reply:textDocument/codeAction(1) 1545 ms, error: Task was cancelled.
I[14:33:00.841] --> reply:textDocument/codeAction(2) 1525 ms
I[14:33:00.841] --> reply:textDocument/inlayHint(3) 1525 ms, error: Task was cancelled.
I[14:33:00.841] --> reply:textDocument/documentLink(4) 1514 ms
I[14:33:00.843] <-- $/setTrace
I[14:33:00.843] unhandled notification $/setTrace
I[14:33:00.848] --> reply:textDocument/documentSymbol(6) 1229 ms
[Error - 2:33:00 PM] Request textDocument/codeAction failed.
[object Object]
I[14:33:00.865] --> reply:textDocument/semanticTokens/full(7) 1245 ms
I[14:33:00.866] --> reply:textDocument/inlayHint(8) 1197 ms, error: Task was cancelled.
I[14:33:00.870] --> reply:textDocument/inlayHint(9) 956 ms
I[14:33:00.870] --> textDocument/clangd.fileStatus
I[14:33:00.967] <-- $/cancelRequest
I[14:33:00.967] <-- textDocument/codeAction(10)
I[14:33:00.968] --> reply:textDocument/codeAction(10) 1 ms
I[14:33:00.968] --> textDocument/clangd.fileStatus
I[14:33:00.972] <-- $/cancelRequest
I[14:33:00.972] <-- $/cancelRequest
I[14:33:00.972] <-- $/cancelRequest
I[14:33:00.972] <-- textDocument/codeAction(11)
I[14:33:00.973] <-- textDocument/documentLink(12)
I[14:33:00.973] <-- textDocument/inlayHint(13)
I[14:33:00.973] <-- textDocument/documentSymbol(14)
I[14:33:00.973] --> reply:textDocument/codeAction(11) 0 ms
I[14:33:00.973] --> reply:textDocument/documentLink(12) 0 ms
[Error - 2:33:00 PM] Request textDocument/inlayHint failed.
[object Object]
I[14:33:00.980] --> reply:textDocument/inlayHint(13) 7 ms
I[14:33:00.982] --> reply:textDocument/documentSymbol(14) 9 ms
I[14:33:00.985] --> textDocument/clangd.fileStatus
[Error - 2:33:00 PM] Request textDocument/inlayHint failed.
[object Object]
I[14:33:01.174] <-- textDocument/semanticTokens/full/delta(15)
I[14:33:01.179] --> reply:textDocument/semanticTokens/full/delta(15) 5 ms
I[14:33:01.180] --> textDocument/clangd.fileStatus
I[14:33:37.208] --> $/progress
I[14:33:37.209] --> $/progress
I[14:33:37.209] --> $/progress
I[14:33:37.209] --> $/progress
I[14:33:37.210] --> $/progress
I[14:33:37.212] --> $/progress
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. /usr/lib/gcc/aarch64-linux-gnu/15/include/arm_bf16.h:40:41: current parser token ';'
1. /usr/lib/gcc/aarch64-linux-gnu/15/include/arm_bf16.h:39:1: parsing function body 'vcvth_bf16_f32'
2. /usr/lib/gcc/aarch64-linux-gnu/15/include/arm_bf16.h:39:1: in compound statement ('{}')
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.so.21.1 0x0000ea6ba40a2d94 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 84
1 libLLVM.so.21.1 0x0000ea6ba40a0acc llvm::sys::RunSignalHandlers() + 172
2 libLLVM.so.21.1 0x0000ea6ba40a3bcc
3 linux-vdso.so.1 0x0000ea6bab5dfa20 __kernel_rt_sigreturn + 0
4 libLLVM.so.21.1 0x0000ea6ba3f89cf0 llvm::APFloatBase::semanticsPrecision(llvm::fltSemantics const&) + 12
5 libclang-cpp.so.21.1 0x0000ea6ba9c808c4 clang::Sema::CheckImplicitConversion(clang::Expr*, clang::QualType, clang::SourceLocation, bool*, bool) + 4308
6 libclang-cpp.so.21.1 0x0000ea6ba9c85cb4
7 libclang-cpp.so.21.1 0x0000ea6ba9c88074 clang::Sema::CheckCompletedExpr(clang::Expr*, clang::SourceLocation, bool) + 248
8 libclang-cpp.so.21.1 0x0000ea6ba9f04fc0 clang::Sema::ActOnFinishFullExpr(clang::Expr*, clang::SourceLocation, bool, bool, bool) + 308
9 libclang-cpp.so.21.1 0x0000ea6baa0ed2f0 clang::Sema::BuildReturnStmt(clang::SourceLocation, clang::Expr*, bool) + 2348
10 libclang-cpp.so.21.1 0x0000ea6baa0ec8d0 clang::Sema::ActOnReturnStmt(clang::SourceLocation, clang::Expr*, clang::Scope*) + 516
11 libclang-cpp.so.21.1 0x0000ea6ba9212728 clang::Parser::ParseReturnStatement() + 580
12 libclang-cpp.so.21.1 0x0000ea6ba920deac clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector&, clang::Parser::ParsedStmtContext, clang::SourceLocation*, clang::ParsedAttributes&, clang::ParsedAttributes&) + 4052
13 libclang-cpp.so.21.1 0x0000ea6ba920cc5c clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector&, clang::Parser::ParsedStmtContext, clang::SourceLocation*) + 316
14 libclang-cpp.so.21.1 0x0000ea6ba921454c clang::Parser::ParseCompoundStatementBody(bool) + 1788
15 libclang-cpp.so.21.1 0x0000ea6ba9215104 clang::Parser::ParseFunctionStatementBody(clang::Decl*, clang::Parser::ParseScope&) + 192
16 libclang-cpp.so.21.1 0x0000ea6ba922b828 clang::Parser::ParseFunctionDefinition(clang::ParsingDeclarator&, clang::Parser::ParsedTemplateInfo const&, clang::Parser::LateParsedAttrList*) + 2712
17 libclang-cpp.so.21.1 0x0000ea6ba918a1e0 clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, clang::DeclaratorContext, clang::ParsedAttributes&, clang::Parser::ParsedTemplateInfo&, clang::SourceLocation*, clang::Parser::ForRangeInit*) + 4252
18 libclang-cpp.so.21.1 0x0000ea6ba922ac4c clang::Parser::ParseDeclOrFunctionDefInternal(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec&, clang::AccessSpecifier) + 1024
19 libclang-cpp.so.21.1 0x0000ea6ba922a644 clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*, clang::AccessSpecifier) + 476
20 libclang-cpp.so.21.1 0x0000ea6ba9229b50 clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*) + 2540
21 libclang-cpp.so.21.1 0x0000ea6ba922980c clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&, clang::ParsedAttributes&, clang::ParsingDeclSpec*) + 1704
22 libclang-cpp.so.21.1 0x0000ea6ba9228310 clang::Parser::ParseTopLevelDecl(clang::OpaquePtr&, clang::Sema::ModuleImportState&) + 1224
23 libclang-cpp.so.21.1 0x0000ea6ba91742c4 clang::ParseAST(clang::Sema&, bool, bool) + 640
24 libclang-cpp.so.21.1 0x0000ea6baacb1434 clang::FrontendAction::Execute() + 64
25 clangd 0x0000b06bd842c3c8
26 clangd 0x0000b06bd842ed50
27 clangd 0x0000b06bd84326c0
28 clangd 0x0000b06bd842d7ac
29 clangd 0x0000b06bd848c3cc
30 libc.so.6 0x0000ea6b9eccc288
31 libc.so.6 0x0000ea6b9ed36b1c
[Info - 2:33:38 PM] Connection to server got closed. Server will restart.
true
[Error - 2:33:38 PM] Server process exited with signal SIGSEGV.
Contributor guide
Assessment
This issue has not been assessed yet.