Skip to content

Commit 0240828

Browse files
author
Mike McLaughlin
authored
Fix crash when VS4Mac is debugging VS4Mac arm64 (#64085)
Fix crash when VS4Mac is debugging VS4Mac arm64 Issue: #64011
1 parent 090430c commit 0240828

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/coreclr/debug/daccess/dacdbiimpl.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5428,6 +5428,16 @@ GENERICS_TYPE_TOKEN DacDbiInterfaceImpl::ResolveExactGenericArgsToken(DWORD
54285428

54295429
if (dwExactGenericArgsTokenIndex == 0)
54305430
{
5431+
// In a rare case of VS4Mac debugging VS4Mac ARM64 optimized code we get a null generics argument token. We aren't sure
5432+
// why the token is null, it may be a bug or it may be by design in the runtime. In the interest of time we are working
5433+
// around the issue rather than investigating the root cause. This workaround should only cause us to degrade generic
5434+
// types from exact type parameters to approximate or canonical type parameters. In the future if we discover this issue
5435+
// is happening more frequently than we expect or the workaround is more impactful than we expect we may need to remove
5436+
// this workaround and resolve the underlying issue.
5437+
if (rawToken == 0)
5438+
{
5439+
return rawToken;
5440+
}
54315441
// In this case the real generics type token is the MethodTable of the "this" object.
54325442
// Note that we want the target address here.
54335443

0 commit comments

Comments
 (0)