[C#] Deeply nested parens causes editor hang.
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- csharp, typescript
調査の方向性
新しい evil_line.cs ファイルで、提供されたネストされた式を 1 行に結合してハングを再現し、その後、リポジトリの C# 構文文法と、ネストされた括弧およびキャストの処理を調査します。ソースファイルやテストは指定されていません。再現した C# の行によってエディターがハングしなくなり、複数行入力と報告された比較ケースが引き続き使用できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
From @staticvoidmain on August 2, 2018 16:52
Issue Type: Bug
Problem
Too many nested parens on a single line cause C# file to hang.
Additional Info
- I recently reversed some VB to C# and pasted it into code, resulting in a complete hang of the vscode process.
- It's fine if these are separated into multiple lines as in the example, however if it's all on a single line you'll get a hang.
- It's definitely the syntax highlighter, and seems to be specific to C#.
- Tested against insiders, and with no extensions on the current build.
- Tested the same line with other c-like language file extensions (js, ts, cpp, java) and they handle it without a crash.
- Oh, also, if you drop the (object) casts off it's fine as well.
Steps To Reproduce
- New file > evil_line.cs
- Paste these contents
// don't try to join these lines...
var message = Conversions.ToString(
Operators.ConcatenateObject(
Operators.ConcatenateObject(
Operators.ConcatenateObject(
Operators.ConcatenateObject(
Operators.ConcatenateObject(
Operators.ConcatenateObject(
Operators.ConcatenateObject(
Operators.ConcatenateObject(
Operators.ConcatenateObject(
Operators.ConcatenateObject(
Operators.ConcatenateObject(
Operators.ConcatenateObject(
Operators.ConcatenateObject(
Operators.ConcatenateObject(
Operators.ConcatenateObject(
Operators.ConcatenateObject(
Operators.ConcatenateObject(
Operators.ConcatenateObject(
Operators.ConcatenateObject(
Operators.ConcatenateObject(
Operators.ConcatenateObject(
(object) strMsg,
Interaction.IIf(
Strings.Len(strMsg) > 0,
(object) "\r\n",
(object) null)),
(object) "\r\n"),
(object) "name '"),
(object) name),
(object) "'"),
(object) "\r\n"),
(object) "age '"),
(object) age),
(object) "'"),
(object) "\r\n"),
(object) "dob '"),
(object) dob),
(object) "'"),
(object) "\r\n"),
(object) "favoriteColor '"),
(object) favoriteColor),
(object) "'"),
(object) "\r\n"),
(object) "favoriteFilm '"),
(object) favoriteFilm),
(object) "'")
);
- Join Lines
VS Code version: Code 1.25.1 (1dfc5e557209371715f655691b1235b6b26a06be, 2018-07-11T15:43:53.668Z)
OS version: Windows_NT x64 10.0.14393
System Info
| Item | Value |
|---|---|
| CPUs | Intel(R) Xeon(R) CPU E5-2695 v2 @ 2.40GHz (4 x 2400) |
| GPU Status | 2d_canvas: enabled 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: unavailable_software video_decode: enabled video_encode: enabled vpx_decode: enabled webgl: enabled webgl2: enabled |
| Memory (System) | 12.00GB (7.34GB free) |
| Process Argv | C:\Program Files\Microsoft VS Code\Code.exe |
| Screen Reader | no |
| VM | 100% |
Extensions (12)
| Extension | Author (truncated) | Version |
|---|---|---|
| xml | Dot | 2.3.1 |
| EditorConfig | Edi | 0.12.4 |
| tslint | eg2 | 1.0.34 |
| vscode-great-icons | emm | 2.1.39 |
| code-beautifier | mic | 2.1.0 |
| mssql | ms- | 1.4.0 |
| python | ms- | 2018.7.1 |
| cpptools | ms- | 0.17.7 |
| PowerShell | ms- | 1.8.2 |
| team | ms- | 1.136.0 |
| debugger-for-chrome | msj | 4.8.2 |
| vscode-javascript-booster | sbu | 0.10.1 |
Copied from original issue: Microsoft/vscode#55687
- 主要言語
- TypeScript
- スター
- 78
- フォーク
- 43
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
dotnet/csharp-tmLanguage のほかの issue
-
C# syntax highlighting broken with collection expressions and string interpolation in method callsオープン
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
dotnet/csharp-tmLanguage#332 · コメント 7 件 · リアクション 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
dotnet/csharp-tmLanguage#336 · コメント 3 件 ·
-
[Textmate] `scoped ref` modifier対応中かも @JoeRobich が 1016 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
dotnet/csharp-tmLanguage#306 ·
-
[Textmate] Local function with attribute対応中かも @JoeRobich が 1016 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
dotnet/csharp-tmLanguage#304 ·
-
[Textmate] Lambda with attribute対応中かも @JoeRobich が 1016 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 38/100
dotnet/csharp-tmLanguage#303 ·
dotnet/csharp-tmLanguage の issue をすべて見る
似ている issue
-
Table: Space fires onActivate in single-selection mode — the reference doc and the JSDoc disagreeオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
sidorares/react-x11-components#764 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
backnotprop/plannotator#1840 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
JoviDeCroock/pracht#432 ·
メンテナーはふだん 1 日以内に返信
-
approved check:passed streams:add
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
Hardware attribute name "app Connection Support" has inconsistent casing対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
walletbeat/walletbeat#1628 ·
メンテナーはふだん 1 日以内に返信