[1.7] rebaseall corrupted some exes

Reini Urban rurban@x-ray.at
Fri Nov 27 22:12:00 GMT 2009


After a rebaseall *some exes* load the cygwin dll into the wrong place.

The typical failure for such an exe is:
$ wget
       2 [main] wget 724 F:\cygwin2\bin\wget.exe: *** fatal error - 
cygheap base mismatch detected - 0x6120C6E0/0x69C6E0.

It fails with latest cygwin snapshot, 1.0.7-66, -65, -64. Not more 
versions tested. But those exes do work if called from cmd.exe

$ cd /bin
$ for e in *.exe; do echo -n $e; ldd $e|grep cygwin1.dll|cut -c37-; done 
 > /cygbases.lst

Default:
cygwin1.dll => /usr/bin/cygwin1.dll (0x61000000)
All those 0x61000000 exes work fine. But if the cygwin dll is loaded at 
a low adress, the exe fails.

git, wget and ssh are sample showstoppers:

$ grep -v 6100 /cygbases.lst
email.exe (0x470000)
fetchmail.exe (0x590000)
git-receive-pack.exe (0x580000)
git-shell.exe (0x4c0000)
git-upload-archive.exe (0x580000)
git-upload-pack.exe (0x4d0000)
git.exe (0x580000)
irssi.exe (0xd40000)
octave-3.2.3.exe (0x460000)
octave.exe (0x460000)
openssl.exe (0x4c0000)
ssh-add.exe (0x470000)
ssh-agent.exe (0x470000)
ssh-keygen.exe (0x480000)
ssh-keyscan.exe (0x490000)
ssh.exe (0x4b0000)
stunnel.exe (0x470000)
wget.exe (0x490000)

Hmm, after some more inspection of those exes I saw that always the 
first cygwin dll before cygwin1.dll was cygcrypto-0.9.8.dll

$ ldd wget
         ntdll.dll => /cygdrive/c/WINDOWS/system32/ntdll.dll (0x7c910000)
         kernel32.dll => /cygdrive/c/WINDOWS/system32/kernel32.dll 
(0x7c800000)
         cygcrypto-0.9.8.dll => /cygdrive/n/bin/cygcrypto-0.9.8.dll 
(0x61110000)
         cygwin1.dll => /cygdrive/n/bin/cygwin1.dll (0x490000)
         ADVAPI32.DLL => /cygdrive/c/WINDOWS/system32/ADVAPI32.DLL 
(0x77da0000)
         RPCRT4.dll => /cygdrive/c/WINDOWS/system32/RPCRT4.dll (0x77e50000)
         Secur32.dll => /cygdrive/c/WINDOWS/system32/Secur32.dll 
(0x77fc0000)
         cyggcc_s-1.dll => /cygdrive/n/bin/cyggcc_s-1.dll (0x6e6e0000)
         cygintl-8.dll => /cygdrive/n/bin/cygintl-8.dll (0x67300000)
         cygiconv-2.dll => /cygdrive/n/bin/cygiconv-2.dll (0x68250000)
         cygssl-0.9.8.dll => /cygdrive/n/bin/cygssl-0.9.8.dll (0x61250000)

After restoring the original un-rebased /bin/cygcrypto-0.9.8.dll
those exe worked again.
I guess the rebasing has to be thought over.
-- 
Reini Urban
http://phpwiki.org/  http://murbreak.at/
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cygcheck.out
URL: <http://cygwin.com/pipermail/cygwin/attachments/20091127/c0e3bd9b/attachment.ksh>
-------------- next part --------------
--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


More information about the Cygwin mailing list