PortablePdbReader/ExceptionDetailsProvider may throw an exception which causes problems in callers like DeveloperExceptionPageMiddleware #14609
Labels
area-middleware
Includes: URL rewrite, redirect, response cache/compression, session, and other general middlesware
Milestone
Describe the bug
PortablePdbReader.GetPdbPath()
callsPEReader.ReadDebugDirectory()
but doesn't handle exceptions that this call might throw. This in turn will then cause problems for callers higher up in the call stack, likeDeveloperExceptionPageMiddleware
or Hellang.Middleware.ProblemDetails which call it viaExceptionDetailsProvider.GetDetails
.To Reproduce
Steps to reproduce the behavior:
Microsoft.Extensions.StackTrace.Sources
andMicrosoft.Extensions.TypeNameHelper.Sources
(via https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json)Expected behavior
No exception should be thrown while getting the details of another exception. If the exception details can't be collected, show as many details as possible, but don't fail.
Additional context
It is important to use Oracle.ManagedDataAccess to reproduce the problem. Oracle.ManagedDataAccess.Core will not cause the problem! It looks like Oracle.ManagedDataAccess is obfuscated and I assume that causes the exception in
PEReader.ReadDebugDirectory()
.To explain why I use the non-core version of Oracle.ManagedDataAccess: I initially found this in an solution that runs ASP.NET Core 2.2 on .NET Framework 4.7.1
Output of
dotnet --info
:The text was updated successfully, but these errors were encountered: