Does the latest Visual Studio 2005 Security Update cause C runtime library issues when hot fixing customer sites

房东的猫 提交于 2019-12-06 20:34:26

The version number specified in the application’s manifest file/resource only specifies the minimum version required to run the application. The default behavior of the loader is to first check the WINDOWS\WinSxS folder for the identical version or a superseding version of a dependency identified in an application manifest, and to use that version regardless of whether or not a private assembly containing the dependency has been provided with the application. (See http://msdn.microsoft.com/en-us/library/aa375674(VS.85).aspx).

So chances are your old binaries will also use the latest version of the Microsoft run time library anyway. Try to run the release build of your application (built before you update your Visual Studio) on a fully patched machine and use process explorer to see which DLLs it loads. The only problem is you will have to include the new run time redistributable file in your patch.

If you are still worried, you can try the method described here: http://tedwvc.wordpress.com/2009/08/10/avoiding-problems-with-vc2005-sp1-security-update-kb971090/

Yes you will not have to wait too much to see the problems using two runtime libraries.

If you allocate memory with a runtime and try to release it with another, your application will crash. It is and will continue being a problem.

Only the runtime what reserved the memory can track it. It is imposible for the other runtime to know how much memory you reserved.

You may want to read this, is a really good post about linking with msvcrt.dll.

pauldoo

I have heard (only by rumour) that if the manifest gives two versions of the CRT that only differ by minor revision number, then the application ends up only using the newer version at runtime. Ie, you do not run into problems with with multiple CRTs.

This is only rumour, and I'd love to hear a concrete answer on this.

See also: Visual Studio 2005 security updates and CRT DLL versions in manifest

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!