libgit2 / libgit2/libgit2sharp

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

Đang mở
#1,776 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Ngôn ngữ chính
C#
Star
3.5k
Fork
925
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu tại Repository.RecursivelyCloneSubmodules và theo Proxy.git_submodule_resolve_url đến lệnh gọi git_submodule_resolve_url native được hiển thị trong stack trace. Tái hiện việc clone AIDungeon trên Windows với RecurseSubmodules được bật, sau đó xác minh rằng quá trình clone đệ quy hoàn tất mà không có AccessViolationException.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
csharp, git
Lĩnh vực
devtools
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.