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

VSCode.CPP.IntelliSense segfault when open my code #3081

Closed
everything411 opened this issue Jan 24, 2019 · 3 comments
Closed

VSCode.CPP.IntelliSense segfault when open my code #3081

everything411 opened this issue Jan 24, 2019 · 3 comments
Labels
bug fixed Check the Milestone for the release in which the fix is or will be available. Language Service regression A bug that didn't exist in a previous release reliability Visual Studio Inherited from Visual Studio
Milestone

Comments

@everything411
Copy link

Issue Type: Bug

/* my code begin */
#include<cstdio>
using namespace std;
#define maxn = 1e5 + 7;
struct nd
{
    int l, r, v, lz;
} seg[maxn << 2];
/* something else */
/* my code end */

Originally ,I write "const int maxn = 1e5 + 7;" and then I change it to use define, but I forget changing other parts of this line ,thus causing a syntax error. However when my mouse points to the "maxn << 2" syntax error, IntelliSense crashed.
Since I tried this opeartion 4 times, there are 4 faults in my dmesg

dmesg

[251120.472569] Microsoft.VSCod[14781]: segfault at 7300000060 ip 00000000008608f8 sp 00007f76277fce90 error 4 in Microsoft.VSCode.CPP.IntelliSense.Msvc.linux[400000+78e000]
[251120.472588] Code: 01 00 00 bf 09 00 00 00 e8 85 d0 f2 ff 48 8b 48 48 80 49 18 04 49 8b 0e 48 89 48 40 49 89 06 48 89 45 00 48 89 c5 4c 8d 70 40 <49> 8b 06 48 85 c0 74 57 4f 8d 74 2c 38 4b 8b 54 2c 38 48 85 d2 75
[251170.017497] traps: Microsoft.VSCod[14997] general protection ip:77dd50 sp:7f7197ffdeb0 error:0 in Microsoft.VSCode.CPP.IntelliSense.Msvc.linux[400000+78e000]
[251410.801681] traps: Microsoft.VSCod[15154] general protection ip:77dd50 sp:7fd5e3ea5eb0 error:0 in Microsoft.VSCode.CPP.IntelliSense.Msvc.linux[400000+78e000]
[251425.344450] traps: Microsoft.VSCod[15179] general protection ip:77dd50 sp:7f7159a3ceb0 error:0 in Microsoft.VSCode.CPP.IntelliSense.Msvc.linux[400000+78e000]Microsoft.VSCode.CPP.IntelliSense.Msvc.linux[400000+78e000]

Extension version: 0.21.0
VS Code version: Code 1.30.2 (61122f88f0bf01e2ac16bdb9e1bc4571755f5bd8, 2019-01-07T22:49:48.319Z)
OS version: Linux x64 4.19.0-1-amd64

System Info
Item Value
CPUs Intel(R) Core(TM) i5-8300H CPU @ 2.30GHz (8 x 3560)
GPU Status 2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: disabled_software
video_decode: unavailable_software
video_encode: unavailable_software
webgl: enabled
webgl2: enabled
Load (avg) 1, 0, 0
Memory (System) 15.54GB (7.83GB free)
Process Argv --unity-launch
Screen Reader no
VM 0%
@sean-mcmanus sean-mcmanus added bug reliability parser regression A bug that didn't exist in a previous release labels Jan 24, 2019
@sean-mcmanus sean-mcmanus added this to the On Deck milestone Jan 24, 2019
@sean-mcmanus
Copy link
Collaborator

Thanks a lot for the repro. It's a bug with our parser in gcc/clang mode (not msvc/cl.exe mode). It's a regression starting with this release.

@sean-mcmanus
Copy link
Collaborator

The bug also repros with Visual Studio 2019 Preview 2, so I filed a bug with them https://developercommunity.visualstudio.com/content/problem/439866/c-intellisense-process-vcpkgsrvexe-crashes-when-ho.html . People hitting issues like this should upvote that issue.

@sean-mcmanus sean-mcmanus added Visual Studio Inherited from Visual Studio and removed parser labels Feb 13, 2019
@sean-mcmanus sean-mcmanus removed this from the On Deck milestone Feb 13, 2019
@sean-mcmanus sean-mcmanus added this to the June 2019 milestone Jun 27, 2019
@sean-mcmanus sean-mcmanus added the fixed Check the Milestone for the release in which the fix is or will be available. label Jun 27, 2019
@sean-mcmanus
Copy link
Collaborator

Fixed with https://github.com/microsoft/vscode-cpptools/releases/tag/0.24.0-insiders3 . Set the "C_Cpp.updateChannel" setting to "Insiders" to auto-install the latest Insiders vsix. Or if that doesn't work (such as in the remote scenario), manually download and install the vsix that matches the target OS.

@github-actions github-actions bot locked and limited conversation to collaborators Oct 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug fixed Check the Milestone for the release in which the fix is or will be available. Language Service regression A bug that didn't exist in a previous release reliability Visual Studio Inherited from Visual Studio
Projects
None yet
Development

No branches or pull requests

2 participants