runtime icon indicating copy to clipboard operation
runtime copied to clipboard

Enable logging managed stack trace for AV to event log

Open janvorli opened this issue 3 years ago • 1 comments

.NET Framework was logging managed stack trace of access violations that happened in external native code in the event log. .NET core only logs the address and error code of the exception, which makes it difficult for developers to figure out which part of their managed code has called the failing native code. The reason why .NET core doesn't print the stack trace is that the access violation is now handled as fail fast instead of regular unhandled exception. And while we report managed stack traces in the EEPolicy::FatalError for fail fasts called from our runtime and managed code in both runtime and user code, we don't report it when we come to that method due to the access violation.

This change enables printing the stack trace for that case too.

janvorli avatar Sep 15 '22 21:09 janvorli

cc: @noahfalk

janvorli avatar Sep 15 '22 21:09 janvorli

Any chance you could back port this? I have severely missed this from .net framework.

TonyValenti avatar Sep 22 '22 00:09 TonyValenti

/backport to release/7.0

janvorli avatar Sep 30 '22 08:09 janvorli

Started backporting to release/7.0: https://github.com/dotnet/runtime/actions/runs/3157215304

github-actions[bot] avatar Sep 30 '22 08:09 github-actions[bot]