libgit2 / libgit2/libgit2sharp
Passing null to Repository.Discover(...) causes AccessViolationException / process termination
オープン
まだ誰も着手していません。
- 主要言語
- C#
- スター
- 3.5k
- フォーク
- 925
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Reproduction steps
- Pass
nulltoRepository.Discover(...)
Expected behavior
A friendly exception. 😉
Actual behavior
Application: devenv.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.AccessViolationException
at LibGit2Sharp.Core.NativeMethods.git_repository_discover(LibGit2Sharp.Core.Handles.GitBuf, LibGit2Sharp.Core.FilePath, Boolean, LibGit2Sharp.Core.FilePath)
at LibGit2Sharp.Core.Proxy+<>c__DisplayClass3e.<git_repository_discover>b__3d(LibGit2Sharp.Core.Handles.GitBuf)
at LibGit2Sharp.Core.Proxy.ConvertPath(System.Func`2<LibGit2Sharp.Core.Handles.GitBuf,Int32>)
at LibGit2Sharp.Core.Proxy.git_repository_discover(LibGit2Sharp.Core.FilePath)
at LibGit2Sharp.Repository.Discover(System.String)
at GitHub.Services.GitService.GetRepository(System.String)
Version of LibGit2Sharp (release number or SHA1)
0.23.1.0
Operating system(s) tested; .NET runtime tested
Windows 10 + .NET v4.0.30319
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
失敗しているエントリポイントは Repository.Discover(String) で、スタックトレースでは Core.Proxy.git_repository_discover と NativeMethods.git_repository_discover に到達しています。まずそこから、null のパスがネイティブ呼び出しにどのように渡されるかを追跡し、その後リグレッションテストを追加して、null によってプロセスが終了するのではなくマネージ例外が発生することを確認してください。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- csharp, git
- 領域
- api, backend
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 38/100