Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cwd.dll incorrectly compiled, prevents git add -p #2560

Closed
zoidbergthepopularone opened this issue Mar 26, 2020 · 3 comments
Closed

cwd.dll incorrectly compiled, prevents git add -p #2560

zoidbergthepopularone opened this issue Mar 26, 2020 · 3 comments

Comments

@zoidbergthepopularone
Copy link

The problem

I am listing the "setup" below, since it is required, but it if fairly irrelevant. The problem is quite obviously caused by the fact that cwd.dll (GIT\usr\lib\perl5\core_perl\auto\Cwd\cwd.dll) and apparently quite a few, if not all, other Python DLLs, are now compiled without the IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE flag in the DllCharacteristics field. Which means that if any library happens to want the same space that is already occupied, then that library will fail to load and any functionality it provides will not be available.

Setup

  • Which version of Git for Windows are you using? Is it 32-bit or 64-bit?
git version 2.26.0.windows.1
cpu: i686
built from commit: 9c98e1ccdfd839e4eaae1c2747d0088ef89d446b
sizeof-long: 4
sizeof-size_t: 4

Occurs in 2.25.0 as well.

  • Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
Microsoft Windows [Version 10.0.18363.657]
  • What options did you set as part of the installation? Or did you choose the
    defaults?
I am using portable in C:\Git. No installation was performed so install-options.txt do not exist.
  • Any other interesting things about your environment that might be related
    to the issue you're seeing?
No.

Details

  • Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other
cmd.exe
git add -p somefile.txt
  • What did you expect to occur after running these commands?
Get a choice of actions for each difference found.
  • What actually happened instead?
      1 [main] perl 297 child_info_fork::abort: address space needed by 'Cwd.dll' (0x1D0000) is already occupied                                                Can't fork, trying again in 5 seconds at C:/GIT/mingw32/share/perl5/Git.pm line 1621.
  • If the problem was occurring with a specific repository, can you provide the
    URL to that repository to help us with testing?
Happens in all repositories but not necessarily on all computers.
@rimrul
Copy link
Member

rimrul commented Mar 26, 2020

Python dlls

I don't think we ship any python dlls, so I'll assume you meant perl.

The issue is, our perl is based on MSys2. And AFAIK MSys2 and Cygwin can't be compiled with dynamic base.

@rimrul
Copy link
Member

rimrul commented Mar 26, 2020

See https://github.com/git-for-windows/git/wiki/32-bit-issues#solutions for some workarounds that might help.

@dscho
Copy link
Member

dscho commented Mar 26, 2020

Once you call git config --system add.interactive.usebuiltin true, the issue will be gone.

Alternatively, you can call usr\bin\bash -lc "/usr/bin/rebase -b 0x63070000 /usr/lib/perl5/core_perl/auto/*/{*,*/*}.dll" in the top-level directory of the portable Git. This is a known 32-bit issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants