jeudi 3 août 2017

Possible different behaviors for C# in debug and release build

In C++, compiler optimization may produce "unexpected" program behaviors by assuming a program free of undefined behaviors, like signed integer overflows and dereferencing null pointers. It is important to test a program in release build if a release build is used in the production.

In C#, undefined behaviors are rare. Are there more reasons to test a program in release build other than

  1. Unsafe code
  2. Multithread timing
  3. Debug/release mode enabled/disabled code

Can optimization produce different program behaviors like C++?

Aucun commentaire:

Enregistrer un commentaire