The .NET 4.5 beta has a bug that manifests itself as an AV or an FatalExecutionEngineError in certain circumstances of String.Empty handling, which is fixed by the .NET 4.5 RTM that shipped earlier this month followed by Visual Studio 2010 RTM today.
Thanks both to the original poster for reporting it here, and to Michael for his excellent analysis.
My counterparts on the CLR tried to reproduce the bug here and discovered that it reproduces on the “Release Candidate” version of the 64 bit CLR, but not on the final “Released To Manufacturing” version, which had a number of bug fixes post-RC. (The RTM version will be available to the public on August 15th, 2012.)
They therefore believe this to be the same issue as the one that was reported here:
Many apologies for the error.
–jeroen
via: c# – What’s the cause of this strange bug? – Stack Overflow.