Chris Sutcliffe wrote:
> Starting sh.exe using MSys 1.0.13-2 causes an immediate crash. I
> updated the -bin and -dev packages to 1.0.13-2 from 1.0.12, are there
> other packages I also need to upgrade to make it work?
No, not really.
Please unpack the following archives into an empty directory:
> Please unpack the following archives into an empty directory:
> Then, run the newly created msys.bat. You may also try to reduce PATH to
> a minimum.
> Does it still crash?
Yep, and running sh.exe itself:
0 [main] us 0 init_cheap: VirtualAlloc pointer is null, Win32 error 487
AllocationBase 0x0, BaseAddress 0x71690000, RegionSize 0x410000, State 0x10000
C:\MSYS-TEMP\bin\sh.exe: *** Couldn't reserve space for cygwin's heap,
Win32 error 6
Any ideas on what I can try to correct the error? 1.0.12 works OK for
me (other than the chmod issue I mentioned previously).
> Oh, geez. This sounds like either the dreaded DLL rebasing problem, or a
> BLODA. For the latter problem, see if any of these applications are
> installed on your machine:
> Until then, if you have cygwin installed (or access to the microsoft
> 'rebase' tool) you could use THAT to try and rebase the msys dll itself:
> rebase -b 0x30000000 /path/to/msys-1.0.dll
It was the rebase problem, using Cygwin's rebase solved the issue
(thank you for the tip).
Wouldn't this be a good case for using '-Wl,--enable-auto-image-base'
when linking msys-1.0.dll?
> Wouldn't this be a good case for using '-Wl,--enable-auto-image-base'
> when linking msys-1.0.dll?
No, I don't think so. The image base for cygwin1.dll and msys-1.0.dll is
actually explicitly specified in the build machinery (a fairly uncommon
thing in the world of cygwin/msys DLLs). Changing it to auto would just
move it somewhere else that may -- or may NOT -- have fewer conflicts on
SOME systems, but not others. And it wouldn't be under our control.
But /somebody/ is going to see conflicts, no matter what memory address
we (or --auto) picks.
BTW, just as cygwin-rebase can't rebase cygwin1.dll, my msys port of
rebase can't rebase msys-1.0.dll. Maybe we need a pure win32 version...
But I guess you still would have problems with rebasing in-use .dll files.
You need to copy them to a new name, use the rebase.exe tool, then exit
every process using the .dll file and replace the .dll file.