libgit2 / libgit2/libgit2sharp
Crash in git_diff_tree_to_index when calling Repository.RetrieveStatus
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 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
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu với project tái hiện Unity đính kèm và lời gọi Repository.RetrieveStatus được mô tả trong issue. Xem xét stack crash native xung quanh git_diff_tree_to_index và git_status_list_new, sau đó xác minh trên Windows 10 rằng bản tái hiện không còn crash và trả về RepositoryStatus.
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, unity
- 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
- Cần làm rõ
- Mức phù hợp với người mới
- 30/100