Skip to content
Merged
Show file tree
Hide file tree
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
Prev Previous commit
More unwanted uninitialization removed
  • Loading branch information
janvorli committed Mar 26, 2024
commit fabd3cd5875fb54962cbe5da26d1b4e2ebe000f7
27 changes: 0 additions & 27 deletions src/coreclr/vm/ceemain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1345,32 +1345,9 @@ void STDMETHODCALLTYPE EEShutDownHelper(BOOL fIsDllUnloading)
TerminateDebugger();
#endif // DEBUGGING_SUPPORTED

StubManager::TerminateStubManagers();

#ifdef FEATURE_INTERPRETER
Interpreter::Terminate();
#endif // FEATURE_INTERPRETER

//@TODO: find the right place for this
VirtualCallStubManager::UninitStatic();

// Unregister our vectored exception and continue handlers from the OS.
// This will ensure that if any other DLL unload (after ours) has an exception,
// we wont attempt to process that exception (which could lead to various
// issues including AV in the runtime).
//
// This should be done:
//
// 1) As the last action during the shutdown so that any unexpected AVs
// in the runtime during shutdown do result in FailFast in VEH.
//
// 2) Only when the runtime is processing DLL_PROCESS_DETACH.
CLRRemoveVectoredHandlers();

#if USE_DISASSEMBLER
Disassembler::StaticClose();
#endif // USE_DISASSEMBLER

WriteJitHelperCountToSTRESSLOG();

STRESS_LOG0(LF_STARTUP, LL_INFO10, "EEShutdown shutting down logging");
Expand Down Expand Up @@ -1694,10 +1671,6 @@ BOOL STDMETHODCALLTYPE EEDllMain( // TRUE on success, FALSE on error.
LOG((LF_STARTUP, INFO3, "EEShutDown invoked from EEDllMain"));
EEShutDown(TRUE); // shut down EE if it was started up
}
else
{
CLRRemoveVectoredHandlers();
}
break;
}
}
Expand Down
29 changes: 0 additions & 29 deletions src/coreclr/vm/excep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7653,35 +7653,6 @@ void CLRAddVectoredHandlers(void)
#endif // !TARGET_UNIX
}

// This function removes the vectored exception and continue handler registration
// from the OS.
void CLRRemoveVectoredHandlers(void)
{
CONTRACTL
{
NOTHROW;
GC_NOTRIGGER;
MODE_ANY;
}
CONTRACTL_END;
#ifndef TARGET_UNIX

// Unregister the vectored exception handler if one is registered (and we can).
if (g_hVectoredExceptionHandler != NULL)
{
// Unregister the vectored exception handler
if (RemoveVectoredExceptionHandler(g_hVectoredExceptionHandler) == FALSE)
{
LOG((LF_EH, LL_INFO100, "CLRRemoveVectoredHandlers: RemoveVectoredExceptionHandler() failed.\n"));
}
else
{
LOG((LF_EH, LL_INFO100, "CLRRemoveVectoredHandlers: RemoveVectoredExceptionHandler() succeeded.\n"));
}
}
#endif // !TARGET_UNIX
}

//
// This does the work of the Unwind and Continue Hanlder inside the catch clause of that handler. The stack has not
// been unwound when this is called. Keep that in mind when deciding where to put new code :)
Expand Down
1 change: 0 additions & 1 deletion src/coreclr/vm/excep.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ struct EE_ILEXCEPTION_CLAUSE;

void InitializeExceptionHandling();
void CLRAddVectoredHandlers(void);
void CLRRemoveVectoredHandlers(void);
void TerminateExceptionHandling();

// Prototypes
Expand Down
16 changes: 0 additions & 16 deletions src/coreclr/vm/stubmgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -718,22 +718,6 @@ void StubManager::InitializeStubManagers()
#endif // !DACCESS_COMPILE
}

//-----------------------------------------------------------
// Terminate the global stub manager service.
//-----------------------------------------------------------
void StubManager::TerminateStubManagers()
{
#if !defined(DACCESS_COMPILE)

#if defined(_DEBUG)
DbgFinishLog();
s_DbgLogCrst.Destroy();
#endif

s_StubManagerListCrst.Destroy();
#endif // !DACCESS_COMPILE
}

#ifdef _DEBUG

//-----------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion src/coreclr/vm/stubmgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,6 @@ class StubManager
public:
// Startup and shutdown the global stubmanager service.
static void InitializeStubManagers();
static void TerminateStubManagers();

// Does any sub manager recognise this EIP?
static BOOL IsStub(PCODE stubAddress)
Expand Down