开发者

Are there issues loading multiple mscvrt**.dll versions?

I have been unable to find much or an开发者_Go百科y information on this. I have a project which is built using VS2005, thus using the mscvr80.dll. My project also loads a third party library, which then loads up mscvrt60.dll.

Now I have a strange bug in my program where the program crashes with a memory read violation (in debug it is at 0xcdcdcdcd, which from my searches describes an non-initialized memory location). The debugger indicates that the violation is within an unknown function in the third party library.

I have contacted the owners of this library and they do not know of any error, as described. Also, I have other projects, compiled in VS60, which use this third party library, and that do not have similar errors. Thus I am wondering, can there be issues with using multiple common runtime versions? I remember vaguely hearing about situations where one runtime (say in the .dll) could allocate memory, and then if the other version tries to free this memory, that can cause issues. However, I cannot remember where I read this, nor can I find much information on the subject.

Any input is much appreciated.


Freeing memory allocated by one version of the runtime in another version can certainly cause problems. There's no guarantee that the implementation details of the CRT heap remained the same between versions. If you can't find any other work arounds, you can try compiling your application against mscvrt60.dll.


If you are seeing 0xcdcdcdcd, then you may be mixing the debug run-time library and the release run-time library. They should work OK together, but you might try replicating the issue using only the release runtime.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜