Skip to content

Consider using installed Git binaries instead of bundled git/msys-2.0.dll #4039

Closed

Description

@tprasadtp

Description

Currently GitHub desktop uses bundled git mingw binaries (especially msys-2.0.dll). It causes some issues if there is a different version of msys-2.0.dll on the system already installed (likely the case if user has installed Git for Windows). This causes issues like #3096 . Since multiple versions of the said dll causes cygheap problems, Avoid using bundled git/mingw when a Git installation is found on the system.

Version

GitHub Desktop version: 1.0.13

OS version: Microsoft Windows [Version 10.0.16299.248]

Steps to Reproduce

  1. Install 32 bit Git
  2. Install 64 Bit GitHub Desktop app
  3. Clone a repository /commit to a repository & you will get cygheap errors.

The issue is not specific to the 32 bit / 64 bit Github desktop setup case, it happens whenever there are multiple versions of msys-2.0.dll.

Expected behavior: Use installed git binaries /dlls instead of bundled git whenever possible.

Actual behavior: the app currently used bundled binaries

Reproduces how often: Always with different version of msys-2.0.dll. If all the dlls are of same version and arch, then everything works fine.

Activity

  1. j-f1 commented on Feb 18, 2018

    @j-f1
    Contributor

    We don’t use the installed Git version since we can’t guarantee that it’ll work with our calls. For example, if you have an older version of Git installed, it might not support a newer flag that we pass.

  2. shiftkey commented on Feb 18, 2018

    @shiftkey
    Member

    @tprasadtp it's not clear to me which version of 32-bit Git for Windows you've installed to trigger this issue - could you be more specific?

  3. tprasadtp commented on Feb 18, 2018

    @tprasadtp
    Author

    I have tried with the latest version 2.16.1.4. With 64 Bit, commit seems to work, clone fails on 32 bit as well as 64 bit.

  4. tprasadtp commented on Feb 18, 2018

    @tprasadtp
    Author

    Just to be clear, the issue occurs only if ASLR is on.

  5. shiftkey commented on Feb 18, 2018

    @shiftkey
    Member

    Just to be clear, the issue occurs only if ASLR is on.

    This is still the issue, as discussed in #3096, and this isn't something we can address in Desktop or Git for Windows (see this comment). I'll add this to our "known issues" document in #3943.

  6. self-assigned this
    on Feb 18, 2018
  7. shiftkey commented on Feb 18, 2018

    @shiftkey
    Member

    From the old issue:

    After changing to 64 bit all of them use same base so it works fine i guess??

    I'm not aware of any changes to MSYS2 that would make the underlying issue go away, but if you are able to use Git for Windows 64-bit with Mandatory ASLR enabled, then maybe Desktop will get this same benefit when we update our embedded Git? 🤷‍♂️

  8. tprasadtp commented on Feb 19, 2018

    @tprasadtp
    Author

    I spoke too soon I guess. Even on 64 Bit with same base clone fails with same error. I have no idea why it worked few times. I toggled ASLR few times and might not have applied or rebooted I guess.
    Yes, everything works fine with Git for Windows. So I guess it might. Just curious,
    Is there any difference between embedded Git and Git for windows?

  9. shiftkey commented on Feb 19, 2018

    @shiftkey
    Member

    Is there any difference between embedded Git and Git for windows?

    No, these all come from the same source, and would likely have the same issue with Mandatory ASLR enabled.

  10. added this to the 1.1.x milestone on Feb 22, 2018
  11. locked as resolved and limited conversation to collaborators on Jul 18, 2018
  12. unlocked this conversation on Sep 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions