views:

633

answers:

2

Another developer and I are experiencing different behavior in native C++ executables built with Microsoft Visual Studio 2008, Version 9.0.30729.1 SP on different machines.

We are statically linking to the Standard Library so we don't think it's a DLL version issue. We have ruled out differences in our source code and build settings.

We theorized that perhaps we had different "hotfixes" installed on our separate machines that either affect code generation or perhaps have differences in their C++ Standard Library implementations.

We each used [Help | About Microsoft Visual Studio | Copy Info] to get version information and then diffed them. Sure enough, we found a few discrepancies. I have some hotfixes that my colleague does not. And he has a couple which are missing from my installation.

Here's an example hotfix entry from the version info:

Hotfix for Microsoft Visual Studio 2008 Professional Edition - ENU (KB953256) KB953256 This hotfix is for Microsoft Visual Studio 2008 Professional Edition - ENU. If you later install a more recent service pack, this hotfix will be uninstalled automatically. For more information, visit http://support.microsoft.com/kb/953256.

As you'll notice, link provided is dead. In fact, of the four differences we found, all but one have dead links:

Does anyone out there know how to actually find more info about these kinds of mystery hotfixes? Any advice on these particular ones? Short of each fully reinstalling Visual Studio, does anyone have tips on how we might get our separate installations synchronized, perhaps through removing and/or reinstalling hotfixes?

+1  A: 

The main culprit for causing different behavior in native C++ apps would probably be: KB958357

This seems to be an earlier version of what is now KB962219. Details are available in this posting on the Visual C++ Team Blog: http://blogs.msdn.com/vcblog/archive/2008/12/17/vc9-sp1-hotfix-for-the-vector-function-ft-crash.aspx

This hotfix actually fixes 5 bugs:

  1. function::swap() was broken by the Small Functor Optimization in VC9 TR1 (the Feature Pack). This broke vector> in VC9 SP1. "Broken" meant "compiling but crashing".

  2. vector> nonconformantly required X to have a default constructor. (This is a specific example of a general bug: vector>, vector>>, etc. were also affected.)

  3. vector> nonconformantly required X and Y to have default constructors. (This is a specific example of a general bug, see above.)

  4. vector> nonconformantly required X to have a default constructor.

  5. Random distributions were broken, triggering infinite loops and emitting bogus results.

Those look like sufficient changes to cause differing behavior, but it all depends on your code. See if installing the latest version of that hotfix on each machine resolves the discrepancies you're seeing.

breakingobstacles
Thanks! This fixed it!
jwfearn
+1  A: 

I'm not sure how much of a help this is but here is the information for the various hot fixes

  • 948484 - Visual C++ 2008 SP1 Design-Time Components for x64
  • 953256 - Visual Studio Team Explorer SP1
  • 958357 - Appears to be a hot patch for TR1 after Visual Studio 2008 SP1 is installed

Based on the service pack details it looks like one of the following could be the differences between the machines

JaredPar
Thanks! This was very helpful.
jwfearn