Skip to content

User defined literals are crashing GCC IntelliSense #3481

@Novakov

Description

@Novakov

Type: LanguageService

Describe the bug

  • OS and Version: Windows 10 x64 1809
  • VS Code Version: 1.33.1
  • C/C++ Extension Version: 0.22.1 (0.22.2-insiders also affected)
  • Other extensions you installed (and if the issue persists after disabling them): None
  • Using user defined integer literal used in function call when using GCC mode causes crash of Microsoft.VSCode.CPP.IntelliSense.Msvc.exe.

To Reproduce

  1. Clone repository https://github.com/Novakov/vscode-cpp-literals-crash
  2. Open cloned repository in VS Code
  3. Adjust compilerPath in .vscode/c_cpp_properties.json to point to GCC compiler (issue confirmed on arm-none-eabi-gcc and MinGW)
  4. Open C++ log panel
  5. Open test.cpp
  6. Move cursor over Do function call in line 5
  7. IntelliSense crashes with error Failed to read response from server: 4

Expected behavior
Intellisense should not crash.

Screenshots
2019-04-17_19-13-01

Additional context
C++ log output (limited to the moment of crash)

textDocument/hover: 43
Failed to read response from server: 4
IntelliSense engine is not responding. Using the Tag Parser instead.
using Tag Parser for quick info
IntelliSense engine is not responding. Using the Tag Parser instead.
IntelliSense engine is not responding. Using the Tag Parser instead.
Checking for syntax errors: file:///d%3A/tmp/vscode/literals-crash/test.cpp
IntelliSense client is currently disconnected

Microsoft.VSCode.CPP.IntelliSense.Msvc.exe memory dump: Microsoft.VSCode.CPP.IntelliSense.Msvc.exe.zip

Call stack:
image

  • User defined literals using parameter instead of template are working fine (constexpr int operator"" _my( unsigned long long n) { return 0; })
  • MSVC IntelliSense mode is not crashing

Metadata

Metadata

Assignees

No one assigned

    Labels

    Language ServiceVisual StudioInherited from Visual StudiobugfixedCheck the Milestone for the release in which the fix is or will be available.reliability

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions