Pointer arithmetic in checked context is not detected as such
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 52/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- csharp
調査の方向性
Start by tracing how the decompiler translates checked pointer arithmetic, using the input code and generated output in the issue as the reproduction. Identify where pointer addition is represented or emitted and what existing tests cover that path; the issue names no files or tests. Done means checked pointer arithmetic is recognized and decompiled into clearer pointer arithmetic while preserving its checked behavior.
索引モデルが issue の本文から書いたものです。
説明
Input code
public unsafe static byte* PointerInChecked(int* p, int a, int b)
{
#if LEGACY_CSC
// Legacy csc has a compiler bug that causes `a * b` to be evaluated
// with type `nint` instead of `int`; so test without the multiplication.
return checked((byte*)p + a);
#else
return checked((byte*)p + a * b);
#endif
}
Ugly output
public unsafe static byte* PointerInChecked(int* p, int a, int b)
{
return (byte*)checked(unchecked((nuint)p) + unchecked((nuint)a));
}
Not wrong, but the code would be a lot nicer if we detected pointer arithmetic.
- 主要言語
- C#
- スター
- 27.1k
- フォーク
- 3.8k
- 平均マージ
- 1日 23時間
- マージ済み PR(30日)
- 44
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
icsharpcode/ILSpy のほかの issue
-
External UI
難易度 1/5 1〜3時間 初心者へのやさしさ 75/100
icsharpcode/ILSpy#4284 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
icsharpcode/ILSpy#4357 ·
メンテナーはふだん 1 日以内に返信
-
Misdecompilation of a lazy initialization pattern対応中かも @siegfriedpammer が 5 日前に担当しました。 オープンBug Decompiler
難易度 4/5 3〜5日 初心者へのやさしさ 20/100
icsharpcode/ILSpy#4349 ·
メンテナーはふだん 1 日以内に返信
-
Bug
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
icsharpcode/ILSpy#4343 ·
メンテナーはふだん 1 日以内に返信
-
AI
難易度 4/5 1〜2日 初心者へのやさしさ 55/100
icsharpcode/ILSpy#4300 ·
メンテナーはふだん 1 日以内に返信
icsharpcode/ILSpy の issue をすべて見る
似ている issue
-
type:task ux
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
elsa-workflows/elsa-foundation#5253 ·
メンテナーはふだん 1 日以内に返信