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

can't include assert.h header file,if include, then clangd will crash #892

Closed
jingyuexing opened this issue Oct 17, 2021 · 1 comment
Closed

Comments

@jingyuexing
Copy link

Please describe the problem.
For hints on what information is helpful, see: https://clangd.llvm.org/troubleshooting.html

If you can, provide a minimal chunk of code that shows the problem (either inline, or attach it if larger).

Logs

clangd: I[23:02:47.295] <-- reply(0)
clangd: I[23:02:47.295] --> $/progress
clangd: I[23:02:47.295] --> $/progress
:: <-  clangd $/progress: {'token': 'backgroundIndexProgress', 'value': {'kind': 'begin', 'title': 'indexing', 'percentage': 0}}
:: <-  clangd $/progress: {'token': 'backgroundIndexProgress', 'value': {'kind': 'report', 'percentage': 0, 'message': '0/1'}}
clangd: Assertion failed: isValid(), file C:\src\llvm_package_1300-rc4\llvm-project\clang\include\clang/Basic/SourceLocation.h, line 327
clangd:  #0 0x00007ff60d15a1b6 (E:\Programming\LLVM\bin\clangd.exe+0xfa1b6)
clangd:  #1 0x00007ff97aaa1881 (C:\WINDOWS\System32\ucrtbase.dll+0x71881)
clangd:  #2 0x00007ff97aaa2851 (C:\WINDOWS\System32\ucrtbase.dll+0x72851)
clangd:  #3 0x00007ff97aaa41b5 (C:\WINDOWS\System32\ucrtbase.dll+0x741b5)
clangd:  #4 0x00007ff97aaa44f1 (C:\WINDOWS\System32\ucrtbase.dll+0x744f1)
clangd:  #5 0x00007ff60d9b0fc8 (E:\Programming\LLVM\bin\clangd.exe+0x950fc8)
clangd:  #6 0x00007ff60dff7da1 (E:\Programming\LLVM\bin\clangd.exe+0xf97da1)
clangd:  #7 0x00007ff60dff7ffd (E:\Programming\LLVM\bin\clangd.exe+0xf97ffd)
clangd:  #8 0x00007ff60d91cf09 (E:\Programming\LLVM\bin\clangd.exe+0x8bcf09)
clangd:  #9 0x00007ff60d91d97b (E:\Programming\LLVM\bin\clangd.exe+0x8bd97b)
clangd: #10 0x00007ff60d920c82 (E:\Programming\LLVM\bin\clangd.exe+0x8c0c82)
clangd: #11 0x00007ff60d90f403 (E:\Programming\LLVM\bin\clangd.exe+0x8af403)
clangd: #12 0x00007ff60d8923d0 (E:\Programming\LLVM\bin\clangd.exe+0x8323d0)
clangd: #13 0x00007ff60d94c1ae (E:\Programming\LLVM\bin\clangd.exe+0x8ec1ae)
clangd: #14 0x00007ff60e429762 (E:\Programming\LLVM\bin\clangd.exe+0x13c9762)
clangd: #

System information

Output of clangd --version:

clangd version 13.0.0
Features: windows+debug
Platform: x86_64-pc-windows-msvc

Editor/LSP plugin: Sublime text

Operating system: Windows

@sam-mccall
Copy link
Member

Unfortunately this report doesn't have enough info to investigate:

  • the stack trace is not symbolized
  • it's not clear which assert.h file is being used: we probably need the file content, ideally minimized
  • it's not clear what operation the crash is being triggered by (and it's not isolated using clangd --check)

Please see https://clangd.llvm.org/troubleshooting.html for the kind of info that is helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants