When instrumenting DLLs loaded by an executable (all native C and C++) with Microsoft.CodeCoverage.console.exe it stops working and crashes reproducibly with a segementation fault every time it’s launched and a specific execution path is taken. It’s also reproducible that the instrumented code behaves different than expected in another situtation.
The situation would also be reproducible if the executable is statically linked and the executable is instrumented instead of the DLL as in this example, so I assume that the fact that DLLs are instrumented is not the root cause of the problem. The problem only occurs in parts of our instrumented code, not all programs / execution paths seem to be affected - if not affected, everything including recording of code coverage works as expected.
When instrumenting DLLs loaded by an executable (all native C and C++) with
Microsoft.CodeCoverage.console.exe
it stops working and crashes reproducibly with a segementation fault every time it’s launched and a specific execution path is taken. It’s also reproducible that the instrumented code behaves different than expected in another situtation. The situation would also be reproducible if the executable is statically linked and the executable is instrumented instead of the DLL as in this example, so I assume that the fact that DLLs are instrumented is not the root cause of the problem. The problem only occurs in parts of our instrumented code, not all programs / execution paths seem to be affected - if not affected, everything including recording of code coverage works as expected.Reproduction: See
README.tx
t in attached file:coverage_problems.zip
Also see https://developercommunity.visualstudio.com/t/Problem-Report:-Instrumentation-with-Mic/10793811