A critical bug in the optimizer in the just-released .NET 4.6 runtime could break and crash production applications, we’re warned.
“The methods you call can get different parameter values than you passed in,” says Nick Craver – software developer and system administrator for Stack Exchange, home of the popular programming support site Stack Overflow – in a post today.
The bug was hard to spot because it only occurs when optimizations are enabled. This means you can build an application, run it in Visual Studio, and everything is fine. It is only when you compile a production build that the problem occurs. Attaching a debugger, says Craver, changes the behavior and usually hides the issue. It was noticed at Stack Overflow because its heavily exercised HTTP caching code was not working with the new runtime, delivering unpredictable results.
view the full story here