microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.66k stars 28.68k forks source link

Invalid regular expression ctrl+shift+l editor.action.selectHighlights #185377

Closed Tyriar closed 9 months ago

Tyriar commented 1 year ago

Repro:

Open untitled file and paste this into it: output.txt

Select the object after getEnvironment and hit ctrl+shift+l

image

Full warning text shows stack overflow at the end:

Invalid regular expression: /\{"ALLUSERSPROFILE":"C:\\\\ProgramData","APPDATA":"C:\\\\Users\\\\Daniel\\\\AppData\\\\Roaming","CHROME_CRASHPAD_PIPE_NAME":"\\\\\\\\\.\\\\pipe\\\\crashpad_35384_HXUCXRRJQPIRJKJZ","CMDER_ROOT":"C:\\\\Program Files\\\\cmder","CODE":"\\"\.build\\\\electron\\\\Code - OSS\.exe\\"","COLORTERM":"truecolor","COMPUTERNAME":"IFRIT-WORK","ComSpec":"C:\\\\WINDOWS\\\\system32\\\\cmd\.exe","CommonProgramFiles":"C:\\\\Program Files\\\\Common Files","CommonProgramFiles\(x86\)":"C:\\\\Program Files \(x86\)\\\\Common Files","CommonProgramW6432":"C:\\\\Program Files\\\\Common Files","DriverData":"C:\\\\Windows\\\\System32\\\\Drivers\\\\DriverData","EFC_9908":"0","ELECTRON_ENABLE_LOGGING":"1","ELECTRON_ENABLE_STACK_DUMPING":"1","GIT_ASKPASS":"c:\\\\Users\\\\Daniel\\\\AppData\\\\Local\\\\Programs\\\\Microsoft VS Code Insiders\\\\resources\\\\app\\\\extensions\\\\git\\\\dist\\\\askpass\.sh","GIT_LFS_PATH":"C:\\\\Program Files\\\\Git LFS","HOMEDRIVE":"C:","HOMEPATH":"\\\\Users\\\\Daniel","JAVA_HOME":"C:\\\\Program Files\\\\Eclipse Adoptium\\\\jdk-8\.0\.345\.1-hotspot\\\\","LANG":"en_US\.UTF-8","LOCALAPPDATA":"C:\\\\Users\\\\Daniel\\\\AppData\\\\Local","LOGONSERVER":"\\\\\\\\IFRIT-WORK","NAMESHORT":"Code - OSS\.exe","NODE_ENV":"development","NUMBER_OF_PROCESSORS":"16","OPEN_SOURCE_CONTRIBUTOR":"true","ORIGINAL_XDG_CURRENT_DESKTOP":"undefined","OS":"Windows_NT","OneDrive":"C:\\\\Users\\\\Daniel\\\\OneDrive - Microsoft","OneDriveCommercial":"C:\\\\Users\\\\Daniel\\\\OneDrive - Microsoft","OneDriveConsumer":"C:\\\\Users\\\\Daniel\\\\OneDrive","PATHEXT":"\.COM;\.EXE;\.BAT;\.CMD;\.VBS;\.VBE;\.JS;\.JSE;\.WSF;\.WSH;\.MSC;\.CPL","POSH_INSTALLER":"winget","POSH_THEMES_PATH":"C:\\\\Users\\\\Daniel\\\\AppData\\\\Local\\\\Programs\\\\oh-my-posh\\\\themes","PROCESSOR_ARCHITECTURE":"AMD64","PROCESSOR_IDENTIFIER":"Intel64 Family 6 Model 151 Stepping 2, GenuineIntel","PROCESSOR_LEVEL":"6","PROCESSOR_REVISION":"9702","PROMPT":"\$P\$G","PSModulePath":"C:\\\\Users\\\\Daniel\\\\Documents\\\\PowerShell\\\\Modules;C:\\\\Program Files\\\\PowerShell\\\\Modules;c:\\\\program files\\\\windowsapps\\\\microsoft\.powershell_7\.3\.4\.0_x64__8wekyb3d8bbwe\\\\Modules;C:\\\\Program Files\\\\WindowsPowerShell\\\\Modules;C:\\\\WINDOWS\\\\system32\\\\WindowsPowerShell\\\\v1\.0\\\\Modules;C:\\\\Program Files \(x86\)\\\\Microsoft Azure Information Protection\\\\Powershell","PUBLIC":"C:\\\\Users\\\\Public","Path":"C:\\\\Program Files\\\\WindowsApps\\\\Microsoft\.PowerShell_7\.3\.4\.0_x64__8wekyb3d8bbwe;C:\\\\Program Files\\\\Eclipse Adoptium\\\\jdk-8\.0\.345\.1-hotspot\\\\bin;C:\\\\WINDOWS;C:\\\\WINDOWS\\\\system32;C:\\\\WINDOWS\\\\System32\\\\Wbem;C:\\\\WINDOWS\\\\System32\\\\WindowsPowerShell\\\\v1\.0\\\\;C:\\\\WINDOWS\\\\System32\\\\OpenSSH\\\\;C:\\\\Program Files \(x86\)\\\\NVIDIA Corporation\\\\PhysX\\\\Common;C:\\\\Users\\\\Daniel\\\\\.windows-build-tools\\\\python27\\\\;C:\\\\Program Files \(x86\)\\\\Gpg4win\\\\\.\.\\\\GnuPG\\\\bin;C:\\\\Program Files\\\\Git LFS;C:\\\\Program Files\\\\nu\\\\bin\\\\;C:\\\\Program Files\\\\starship\\\\bin\\\\;C:\\\\WINDOWS\\\\system32;C:\\\\WINDOWS;C:\\\\WINDOWS\\\\System32\\\\Wbem;C:\\\\WINDOWS\\\\System32\\\\WindowsPowerShell\\\\v1\.0\\\\;C:\\\\Tools\\\\nodejs\\\\;C:\\\\Program Files\\\\NVIDIA Corporation\\\\NVIDIA NvDLISR;C:\\\\Program Files\\\\GitHub CLI\\\\;C:\\\\Program Files\\\\dotnet\\\\;C:\\\\Program Files\\\\Git\\\\cmd;C:\\\\Program Files\\\\Docker\\\\Docker\\\\resources\\\\bin;C:\\\\Program Files\\\\Microsoft VS Code\\\\bin;C:\\\\Users\\\\Daniel\\\\AppData\\\\Local\\\\Programs\\\\Python\\\\Python310\\\\Scripts\\\\;C:\\\\Users\\\\Daniel\\\\AppData\\\\Local\\\\Programs\\\\Python\\\\Python310\\\\;C:\\\\Users\\\\Daniel\\\\AppData\\\\Local\\\\Microsoft\\\\WindowsApps;C:\\\\Users\\\\Daniel\\\\AppData\\\\Local\\\\Programs\\\\oh-my-posh\\\\bin;C:\\\\Users\\\\Daniel\\\\AppData\\\\Local\\\\Programs\\\\oh-my-posh\\\\themes;C:\\\\Users\\\\Daniel\\\\AppData\\\\Local\\\\Programs\\\\Microsoft VS Code Insiders\\\\bin;C:\\\\Users\\\\Daniel\\\\\.vscode-cli\\\\bin;C:\\\\Users\\\\Daniel\\\\AppData\\\\Local\\\\Programs\\\\Microsoft VS Code\\\\bin;C:\\\\Users\\\\Daniel\\\\AppData\\\\Local\\\\Microsoft\\\\WindowsApps;C:\\\\Users\\\\Daniel\\\\AppData\\\\Local\\\\JetBrains\\\\Toolbox\\\\scripts;C:\\\\Users\\\\Daniel\\\\AppData\\\\Roaming\\\\npm;C:\\\\Users\\\\Daniel\\\\AppData\\\\Local\\\\nvs\\\\;C:\\\\Program Files \(x86\)\\\\Microsoft Visual Studio\\\\2017\\\\BuildTools\\\\MSBuild\\\\15\.0\\\\Bin;;C:\\\\Github\\\\microsoft\\\\bin C:\\\\Github\\\\microsoft\\\\bin C:\\\\Github\\\\microsoft\\\\bin C:\\\\Github\\\\microsoft\\\\bin C:\\\\Github\\\\microsoft\\\\bin C:\\\\Github\\\\microsoft\\\\bin C:\\\\Github\\\\microsoft\\\\bin C:\\\\Github\\\\microsoft\\\\bin C:\\\\Github\\\\microsoft\\\\bin C:\\\\Github\\\\microsoft\\\\bin C:\\\\Github\\\\microsoft\\\\bin C:\\\\Github\\\\microsoft\\\\bin C:\\\\Github\\\\microsoft\\\\bin C:\\\\Github\\\\microsoft\\\\bin C:\\\\Github\\\\microsoft\\\\bin C:\\\\Github\\\\microsoft\\\\bin C:\\\\Github\\\\microsoft\\\\bin C:\\\\Github\\\\microsoft\\\\bin C:\\\\Github\\\\microsoft\\\\bin C:\\\\Github\\\\microsoft\\\\bin C:\\\\Github\\\\microsoft\\\\bin C:\\\\Github\\\\microsoft\\\\bin C:\\\\Github\\\\microsoft\\\\bin C:\\\\Github\\\\microsoft\\\\bin","ProgramData":"C:\\\\ProgramData","ProgramFiles":"C:\\\\Program Files","ProgramFiles\(x86\)":"C:\\\\Program Files \(x86\)","ProgramW6432":"C:\\\\Program Files","SESSIONNAME":"Console","STARSHIP_SESSION_KEY":"3oHDdU2tf7OXysZC","STARSHIP_SHELL":"pwsh","SystemDrive":"C:","SystemRoot":"C:\\\\WINDOWS","TEMP":"C:\\\\Users\\\\Daniel\\\\AppData\\\\Local\\\\Temp","TERM_PROGRAM":"vscode","TERM_PROGRAM_VERSION":"1\.80\.0-insider","TMP":"C:\\\\Users\\\\Daniel\\\\AppData\\\\Local\\\\Temp","UATDATA":"C:\\\\WINDOWS\\\\CCM\\\\UATData\\\\D9F8C395-CAB8-491d-B8AC-179A1FE1BE77","USERDOMAIN":"IFRIT-WORK","USERDOMAIN_ROAMINGPROFILE":"IFRIT-WORK","USERNAME":"Daniel","USERPROFILE":"C:\\\\Users\\\\Daniel","VIRTUAL_ENV_DISABLE_PROMPT":"1","VSCODE_AMD_ENTRYPOINT":"vs\/platform\/terminal\/node\/ptyHostMain","VSCODE_CLI":"1","VSCODE_CRASH_REPORTER_PROCESS_TYPE":"ptyHost","VSCODE_CWD":"C:\\\\Github\\\\microsoft\\\\vscode","VSCODE_DEV":"1","VSCODE_GIT_ASKPASS_EXTRA_ARGS":"--ms-enable-electron-run-as-node","VSCODE_GIT_ASKPASS_MAIN":"c:\\\\Users\\\\Daniel\\\\AppData\\\\Local\\\\Programs\\\\Microsoft VS Code Insiders\\\\resources\\\\app\\\\extensions\\\\git\\\\dist\\\\askpass-main\.js","VSCODE_GIT_ASKPASS_NODE":"C:\\\\Users\\\\Daniel\\\\AppData\\\\Local\\\\Programs\\\\Microsoft VS Code Insiders\\\\Code - Insiders\.exe","VSCODE_GIT_IPC_HANDLE":"\\\\\\\\\.\\\\pipe\\\\vscode-git-4120c6d696-sock","VSCODE_INJECTION":"1","VSCODE_IPC_HOOK":"\\\\\\\\\.\\\\pipe\\\\45ffac5990ee630046881306f9f81069-1\.80\.0-main-sock","VSCODE_NLS_CONFIG":"\{\\"locale\\":\\"en-gb\\",\\"osLocale\\":\\"en-au\\",\\"availableLanguages\\":\{\},\\"_languagePackSupport\\":true\}","VSCODE_PID":"35384","VSCODE_PIPE_LOGGING":"true","VSCODE_VERBOSE_LOGGING":"true","__COMPAT_LAYER":"DetectorsAppHealth","windir":"C:\\\\WINDOWS"\}/: Stack overflow
hediet commented 1 year ago

Duplicate of #183388?

hediet commented 9 months ago

Closing as duplicate