2 ms·
He didn't even mention some of the fun tricks that Microsoft pulled with the versioning of the C and MFC runtime dll's. For example in the summer of 2008 with t
by roel_v 16y ago
He didn't even mention some of the fun tricks that Microsoft pulled with the versioning of the C and MFC runtime dll's. For example in the summer of 2008 with the release of SP1 for Visual Studio 2008, they included a security fix in ATL that required a new runtime. Now all of a sudden all applications build with the Visual Studio that included that SP required different runtime dll's to be deployed. Double the fun when you have a bunch of dll's that require the 'old' version (no SP) and some that require the new one. You can't ship them in the same directory because they have the same name.
For anyone trying to debug building problems, see this stack overflow question which shows, judging by the upvotes, that many people were bitten by this (people still upvote the answers there, still getting hit by this, after 2 years): http://stackoverflow.com/questions/59635/app-does-not-run-with-vs-2008-sp1-dlls-previous-version-works-with-rtm-versions/ http://stackoverflow.com/questions/59635/app-does-not-run-wi... .
- dmethvin 16y agoSo sad, because that could have been the DLL's finest hour. A lot of code uses ATL. Imagine if Microsoft had been able to update a few ATL DLLs and close the hole for every app written to dynamically link to ATL. Instead, the dynalinkers were no better off than the static linkers. No wait, they were worse off.
- roel_v 16y agoTo elaborate, the rub here was that ATL heavily relies on templates, code that is instantiated by the client at build time. The fix (IIRC but I don't see any other explanations either) required a change in one of those compiled-at-build-time parts (i.e, in the header), and was of such nature that it changed the ABI. If the part that had the bug had been able to be included in a dll (but it couldn't be because of the way templates work), swapping out the dll would have worked. So arguably it was exactly the static linking (forced by the language) that was at fault here. People who linked dynamically were forced to make some painful changes, but those who linked statically potentially had the security bug left in their programs. I'm not sure who of the two would be worse off here. I guess at Microsoft they considered the security implications severe enough to warrant a patch as disruptive as this one was.