Open ctron opened 3 months ago
I am using git2 0.18.3
and libgit2-sys 0.16.2+1.7.2
Can you create a reproduction? Otherwise I don't think we'll be able to help.
I briefly tried that, but didn't succeed and went in a different direction. If that helps, I'll try again and see if I can get there. Because on that single installation, it fails 100% of the time.
Just a quick update, I am trying to narrow it down. Using the original application, it seems to work when using cargo
to compile and run it. Using cross
to compile it (using the similar or same Ubuntu version the cross container image should have) results in a segfault. Always at the same location.
I do have a reproducer. It's a bit complex and a bit weird. It seems to include cross
and aarch64
: https://github.com/ctron/git2-repro
The main difference I figured out so far is that cross
actually uses an Ubuntu 16.04 based image, while I was using an Ubuntu 20.04 VM to reproduce this. cross
updated the container image's base layer, but it seems like they never released that.
Since everything is vendored and static, I don't understand what flows into the final binary that makes a difference.
If I swap out the build image with the edge
version (which is built on what is in main
git) then works.
I don't know which parts influence the final binary to misbehave, as to my understanding everything should be vendored.
On the other side, I am not sure trying to fix an issue which is caused by an 8 year old distribution makes sense.
I am not sure what the exact condition is, as the code works in some cases. It fails on aarch64.
I assume it is using the vendored version (default build flags, compiled with cross, which doesn't have
libgit2
installed afaik). The output ofldd
is: