Skip to content

IntelliSense process crash when aliasing std::tuple #14098

@Icedude907

Description

@Icedude907

Environment

  • C/C++ Extension Version: 1.29.2

Bug Summary and Steps to Reproduce

The following will crash the language server.

#include <tuple>
template<typename... T> using tup = std::tuple<T...>;

auto crashed(){
    return tup{5};
}

Results in: IntelliSense process crash detected: handle_initialize

You can also write

void crashed(){
    auto x = tup{5};
}

To receive IntelliSense process crash detected: handle_update_intellisense

However, the following will not crash it.

void ok(){
    tup<int> x = {5};
}

Configuration and Logs

Log Diagnostics:
-------- Diagnostics - 12/10/2025, 12:43:44 AM
Version: 1.29.2
Current Configuration:
{
    "name": "Win32",
    "includePath": [
        "b:/Documents/Code/ReproducibleIntellisenseCrash/**"
    ],
    "defines": [
        "_DEBUG",
        "UNICODE",
        "_UNICODE"
    ],
    "windowsSdkVersion": "10.0.22621.0",
    "cStandard": "gnu23",
    "cppStandard": "c++26",
    "intelliSenseMode": "windows-gcc-x64",
    "intelliSenseModeIsExplicit": true,
    "cStandardIsExplicit": true,
    "cppStandardIsExplicit": true,
    "mergeConfigurations": false,
    "recursiveIncludes": {},
    "recursiveIncludesReduceIsExplicit": false,
    "recursiveIncludesPriorityIsExplicit": false,
    "recursiveIncludesOrderIsExplicit": false,
    "compilerPath": "C:\\msys64\\ucrt64\\bin\\gcc.exe",
    "compilerPathIsExplicit": true,
    "browse": {
        "limitSymbolsToIncludedHeaders": true
    }
}
Modified Settings:
{
    "C_Cpp.default.intelliSenseMode": "windows-gcc-x64",
    "C_Cpp.default.compilerPath": "C:\\msys64\\ucrt64\\bin\\gcc.exe",
    "C_Cpp.default.cStandard": "gnu23",
    "C_Cpp.default.cppStandard": "c++26",
    "C_Cpp.clang_format_style": "file:A:/Coding/.clang-format",
    "C_Cpp.clang_format_fallbackStyle": "WebKit",
    "C_Cpp.loggingLevel": "Debug"
}
Additional Tracked Settings:
{
    "editorTabSize": 4,
    "editorInsertSpaces": true,
    "editorAutoClosingBrackets": "languageDefined",
    "filesEncoding": "utf8",
    "filesAssociations": {
        "*.asm": "arm",
        "*.atsln": "sln",
        "*.f": "glsl",
        "*.fsh": "glsl",
        "*.inc": "arm",
        "*.ipp": "cpp",
        "*.js.download": "javascript",
        "*.Rmd": "markdown",
        "*.s": "arm",
        "*.sasmproj": "toml",
        "*.tpp": "cpp",
        "*.v": "glsl",
        "*.vsh": "glsl"
    },
    "filesExclude": {
        "**/.git": false,
        "**/.svn": true,
        "**/.hg": true,
        "**/.DS_Store": true,
        "**/Thumbs.db": true,
        "**/.acpmeta": true,
        "**/CVS": true
    },
    "filesAutoSaveAfterDelay": false,
    "editorInlayHintsEnabled": true,
    "editorParameterHintsEnabled": true,
    "searchExclude": {
        "**/node_modules": true,
        "**/bower_components": true,
        "**/*.code-search": true
    },
    "workbenchSettingsEditor": "ui"
}
cpptools version (native): 1.29.2.0
Current database path: C:\USERS\_____\APPDATA\LOCAL\MICROSOFT\VSCODE-CPPTOOLS\AE7C2A44E0E3386F3C69C9A14F8F4682\.BROWSE.VC.DB
No active translation units.

------- Workspace parsing diagnostics -------
Number of files discovered (not excluded): 14353
Number of files parsed: 2419


Call stack of "compiler_thread_routine":
--------------------------
cpptools-srv.exe!copy_pack_expansion_descr_with_substitution() (Unknown Source:0)
cpptools-srv.exe!copy_template_arg_list_with_substitution(struct a_symbol *,struct a_template_arg *,struct a_template_param *,struct a_template_param *,struct a_template_arg *,struct a_template_param *,struct a_source_position *,int,int *,struct a_ctws_state *) (Unknown Source:0)
cpptools-srv.exe!copy_template_class_reference_with_substitution() (Unknown Source:0)
cpptools-srv.exe!copy_type_with_substitution(struct a_type *,struct a_template_arg *,struct a_template_param *,struct a_source_position *,int,int *,struct a_ctws_state *) (Unknown Source:0)
cpptools-srv.exe!copy_parent_type_with_substitution(struct a_symbol *,struct a_type *,struct a_template_arg *,struct a_template_param *,struct a_source_position *,int,struct a_type * *,int,int *,struct a_ctws_state *) (Unknown Source:0)
cpptools-srv.exe!symbol_for_template_param_unknown_entity_con_after_substitution(struct a_constant *,struct a_template_arg *,struct a_template_param *,struct a_source_position *,struct a_ctws_state *,int) (Unknown Source:0)
cpptools-srv.exe!make_operand_for_rescanned_identifier() (Unknown Source:0)
cpptools-srv.exe!rescan_expr_with_substitution_internal(struct an_expr_node *,struct a_rescan_control_block *,int,struct an_operand *,struct an_operand *,int) (Unknown Source:0)
cpptools-srv.exe!make_rescan_operand_full(struct an_expr_node *,struct a_rescan_control_block *,int,struct an_operand *,struct an_operand *) (Unknown Source:0)
cpptools-srv.exe!scan_function_call() (Unknown Source:0)
cpptools-srv.exe!rescan_expr_with_substitution_internal(struct an_expr_node *,struct a_rescan_control_block *,int,struct an_operand *,struct an_operand *,int) (Unknown Source:0)
cpptools-srv.exe!rescan_expr_with_substitution(struct an_expr_node *,struct a_type *,struct a_rescan_control_block *,struct a_constant *) (Unknown Source:0)
cpptools-srv.exe!copy_template_param_expr(struct an_expr_node *,struct a_template_arg *,struct a_template_param *,struct a_type *,struct a_source_position *,int,int *,struct a_ctws_state *,struct a_constant *,struct a_constant * *) (Unknown Source:0)
cpptools-srv.exe!create_transformed_deduction_guide_for_alias_template(struct a_symbol *,struct a_symbol *) (Unknown Source:0)
cpptools-srv.exe!create_deduction_guides_for_alias_template() (Unknown Source:0)
cpptools-srv.exe!update_implicit_deduction_guides(struct a_symbol *) (Unknown Source:0)
cpptools-srv.exe!deduce_class_template_args(struct a_type *,int,int,int,struct an_init_component *,struct a_source_position *,struct a_type * *,int *) (Unknown Source:0)
cpptools-srv.exe!deduce_placeholder_type() (Unknown Source:0)
cpptools-srv.exe!prescan_initializer_for_auto_type_deduction(struct a_decl_parse_state *,int) (Unknown Source:0)
cpptools-srv.exe!scan_functional_notation_type_conversion() (Unknown Source:0)

Additional context

I've prepared a minimal reproducable example attached here for use with CMake-Tools providing the intellisense configuration. All compilers I've tested resulted in a crash (msvc-17.14.19, gcc15-msys2-ucrt, clang21-msys2-ucrt)

UsingTupleCrash.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions