From: David D. <dav...@rs...> - 2007-08-29 19:10:25
|
Hi Brian, I've released the MSVC build and can now continue debugging this problem. > From the last email it seems that you've determined that the crash is > in the DllMainCRTStartup() of mingwm10.dll, which is trying to load > at 0x003e0000 despite having an ImageBase of 0x6FBC0000 when built. > Is that right? > ... > To me that sounds like the DLL had to relocated by the loader because > its preferred base address was already occupied I have some output from process explorer, and it is rather interesting.. NAME BASE SIZE IMG BASE mingwm10.dll 0x3E0000 0x11000 0x8FBC0000 Test.exe 0x400000 0x49000 0x40000 wxmsw28_core_gcc_custom.dll 0x4A0000 0x8402000 0x6E500000 Note that the mingwm10.dll's base is different than the IMG BASE? I don't know what the means, because I can't understand what process explorer means by "Base". IMG BASE appears to be where the DLL should be loaded, and there is nothing else loaded anywhere near that range. > This very low location > 0x003e0000 seems like quite a strange place for the NT loader to > choose to relocate the DLL, I thought so too, until I started up visual studio express and saw: NAME BASE SIZE IMG BASE custsat.dll 0x330000 0xB000 0x400000 But the IMG BASE for that DLL seems odd. VS Express seems to run fine that way however. > Secondly, if the debug symbols are correct this mingwm10.dll is linked > with dllcrt1.o instead of the normal -2 version. This seems strange > -- > maybe there's a good reason for it, I don't know. Check the > mingw-runtime Makefile.in to see what the deal here is. It looks like dllcrt[1|2].o are both based on dllcrt1.c: # # Dependancies # [...] dllcrt1.o: dllcrt1.c dllcrt2.o: dllcrt1.c Indeed, they are the same file: $ md5sum.exe "dllcrt1.o" "dllcrt2.o" 6530958f254ca7009862ef1e11dbe50d *dllcrt1.o 6530958f254ca7009862ef1e11dbe50d *dllcrt2.o The difference appears to be only in the crtX.o's: # The special rules are necessary. crt1.o dllcrt1.o: $(CC) -c -D__CRTDLL__ -U__MSVCRT__ $(ALL_CFLAGS) $< -o $@ crt2.o dllcrt2.o: $(CC) -c -D__MSVCRT__ -U__CRTDLL__ $(ALL_CFLAGS) $< -o $@ Where: $ md5sum crt1.o crt2.o 14ac0fa0dc6e83b6850ced2805e3fe55 *crt1.o 59300d24544c6fd37f87659b3c406382 *crt2.o - Dave |