libgit2 / libgit2/libgit2sharp
Crash in git_diff_tree_to_index when calling Repository.RetrieveStatus
オープン
まだ誰も着手していません。
- 主要言語
- C#
- スター
- 3.5k
- フォーク
- 925
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
I originally raised this bug with libgit2 directly but response was that this is in fact a libgit2sharp error.
https://github.com/libgit2/libgit2/issues/5363
Reproduction steps
Use Repository.RetrieveStatus from libgit2sharp from inside Unity3D editor script.
- download this: libgit2-git_diff_tree_to_index-Crash.zip
- download Unity 2019.3.0f5 (other versions crash as well)
- open the above project
- select menu item "Git Error/RetrieveStatus - CRASH"
- note native crash, with the log below
Expected behavior
No crash, instead returns RepositoryStatus
Actual behavior
git2-106a5f2.dll caused an Access Violation (0xc0000005)
in module git2-106a5f2.dll at 0033:7cb4ae65.
Stack Trace of Crashed Thread 9380:
0x00007FFC7CB4AE65 (git2-106a5f2) git_diff_tree_to_index
0x00007FFC7CBB4B09 (git2-106a5f2) git_status_list_new
0x0000028C392EADBF (LibGit2Sharp) LibGit2Sharp.Core.NativeMethods.git_status_list_new()
0x0000028C392EAB9B (LibGit2Sharp) LibGit2Sharp.Core.Proxy.git_status_list_new()
0x0000028C392E57FB (LibGit2Sharp) LibGit2Sharp.RepositoryStatus..ctor()
0x0000028C392E49FB (LibGit2Sharp) LibGit2Sharp.Repository.RetrieveStatus()
Version of LibGit2Sharp (release number or SHA1)
git2-106a5f2, but also happens with e.g. git2-7ce88e6 (happened with all versions I tried).
Operating system(s) tested; .NET runtime tested
Windows 10
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
添付された Unity の再現プロジェクトと、issue で説明されている Repository.RetrieveStatus 呼び出しから始めてください。git_diff_tree_to_index と git_status_list_new 周辺のネイティブクラッシュスタックを確認し、その後 Windows 10 で再現プロジェクトがクラッシュせず RepositoryStatus を返すことを検証してください。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- csharp, git, unity
- 領域
- devtools
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 30/100