Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix type layout diagnostics in the CoreCLR runtime #60305

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/coreclr/vm/jitinterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13640,10 +13640,10 @@ BOOL LoadDynamicInfoEntry(Module *currentModule,

#ifdef _DEBUG
{
TypeLayoutCheck(pMT, pBlob, /* printDiff */ TRUE);
StackScratchBuffer buf;
_ASSERTE_MSG(false, fatalErrorString.GetUTF8(buf));
// Run through the type layout logic again, after the assert, makes debugging easy
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move this comment as well?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Jan for pointing that out. I have moved and rephrased the comment to mention it is usable not only for local debugging but for lab diagnostics too. That led me to realize this is actually not tied to the debug-specific instrumentation for local scenarios so I moved the check a few lines up to fire even in release builds because I believe it doesn't hurt anything.

TypeLayoutCheck(pMT, pBlob, /* printDiff */ TRUE);
}
#endif

Expand Down