diff --git a/src/coreclr/debug/daccess/dacdbiimpl.cpp b/src/coreclr/debug/daccess/dacdbiimpl.cpp index 39130549865e8a..8e587b8d1e5c26 100644 --- a/src/coreclr/debug/daccess/dacdbiimpl.cpp +++ b/src/coreclr/debug/daccess/dacdbiimpl.cpp @@ -5469,6 +5469,12 @@ GENERICS_TYPE_TOKEN DacDbiInterfaceImpl::ResolveExactGenericArgsToken(DWORD if (dwExactGenericArgsTokenIndex == 0) { + // In a rare case of VS4Mac debugging VS4Mac ARM64 optimized code we get a null generics argument token. This workaround + // should only cause us to degrade generic types from exact type parameters to approximate or canonical type parameters. + if (rawToken == 0) + { + return rawToken; + } // In this case the real generics type token is the MethodTable of the "this" object. // Note that we want the target address here.