libgit2 / libgit2/libgit2sharp

Fatal Error : System.AccessViolationException while cloning some repos with RecurseSubmodules on

オープン
#1,776 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
C#
スター
3.5k
フォーク
925
PR マージ指標
30日以内にマージされた PR はありません

説明

I have found out that some repos with the Rescurse Submodulo option flag set to true causes a FatalError System.AccessViolationException, the same repo with the flag on off works as expected

Tried cloning the repo using git client and was able to clone normally with and without the --recursive flag, so now I suspect is something related only to lib2git.

Reproduction steps

Try to clone : https://github.com/AIDungeon/AIDungeon with CloneOptions :

RecurseSubmodules = true

Expected behavior

Successfully clone the repo

Actual behavior

Fatal error. System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. at LibGit2Sharp.Core.NativeMethods.git_submodule_resolve_url(LibGit2Sharp.Core.Handles.GitBuf, LibGit2Sharp.Core.git_repository*, System.String) at LibGit2Sharp.Core.NativeMethods.git_submodule_resolve_url(LibGit2Sharp.Core.Handles.GitBuf, LibGit2Sharp.Core.git_repository*, System.String) at LibGit2Sharp.Core.Proxy.git_submodule_resolve_url(LibGit2Sharp.Core.Handles.RepositoryHandle, System.String) at LibGit2Sharp.Repository.RecursivelyCloneSubmodules(LibGit2Sharp.CloneOptions, System.String, Int32) at LibGit2Sharp.Repository.Clone(System.String, System.String, LibGit2Sharp.CloneOptions)

Version of LibGit2Sharp (release number or SHA1)

0.26.2

Operating system(s) tested; .NET runtime tested

Windows 10
.Net Core 3.1

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

Repository.RecursivelyCloneSubmodulesから開始し、スタックトレースに示されているネイティブのgit_submodule_resolve_url呼び出しまでProxy.git_submodule_resolve_urlを追ってください。RecurseSubmodulesを有効にしてWindows上でAIDungeonのクローンを再現し、その後、AccessViolationExceptionなしで再帰的なクローンが完了することを確認してください。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
csharp, git
領域
devtools
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。