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 setting of ResolutionFailed flag on boot #1353

Merged
merged 1 commit into from
Jun 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
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
9 changes: 6 additions & 3 deletions src/CLR/Startup/CLRStartup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ struct Settings
{
NANOCLR_HEADER();

// cler flag, in case EE wasn't restarted
// clear flag (in case EE wasn't restarted)
CLR_EE_DBG_CLR(StateResolutionFailed);

#if !defined(BUILD_RTM)
Expand Down Expand Up @@ -141,8 +141,11 @@ struct Settings
{
CLR_Debug::Printf( "Error: %08x\r\n", hr );

// exception occurred in assembly loading or type resolution
CLR_EE_DBG_SET(StateResolutionFailed);
if(hr == CLR_E_TYPE_UNAVAILABLE)
{
// exception occurred during type resolution
CLR_EE_DBG_SET(StateResolutionFailed);
}
}
#endif

Expand Down
14 changes: 13 additions & 1 deletion targets/os/win32/nanoCLR/CLRStartup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ struct Settings
{
NANOCLR_HEADER();

// clear flag (in case EE wasn't restarted)
CLR_EE_DBG_CLR(StateResolutionFailed);

#if defined(_WIN32)
CLR_RT_StringVector vec;

Expand Down Expand Up @@ -219,7 +222,16 @@ struct Settings
NANOCLR_CLEANUP();

#if !defined(BUILD_RTM)
if(FAILED(hr)) CLR_Debug::Printf( "Error: %08x\r\n", hr );
if(FAILED(hr))
{
CLR_Debug::Printf( "Error: %08x\r\n", hr );

if(hr == CLR_E_TYPE_UNAVAILABLE)
{
// exception occurred during type resolution
CLR_EE_DBG_SET(StateResolutionFailed);
}
}
#endif

NANOCLR_CLEANUP_END();
Expand Down