Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
15 changes: 8 additions & 7 deletions src/coreclr/vm/ceemain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,7 @@ void EEStartupHelper()
// the completion of its initialization part that initializes COM as that has to be done
// before the first Thread is attached. Thus we want to give the thread a bit more time.
FinalizerThread::FinalizerThreadCreate();
#endif
#endif // TARGET_WINDOWS

InitPreStubManager();

Expand Down Expand Up @@ -926,17 +926,18 @@ void EEStartupHelper()
}
#endif

#ifdef TARGET_WINDOWS
// On windows the finalizer thread is already partially created and is waiting
// right before doing HasStarted(). We will release it now.
FinalizerThread::EnableFinalization();
#elif defined(TARGET_WASM)
// on wasm we need to run finalizers on main thread as we are single threaded
// active issue: https://github.com/dotnet/runtime/issues/114096
#if !defined(TARGET_WINDOWS) && !defined(TARGET_WASM)
#else
// This isn't done as part of InitializeGarbageCollector() above because
// debugger must be initialized before creating EE thread objects
FinalizerThread::FinalizerThreadCreate();
#else
// On windows the finalizer thread is already partially created and is waiting
// right before doing HasStarted(). We will release it now.
FinalizerThread::EnableFinalization();
#endif
#endif // TARGET_WINDOWS

#ifdef FEATURE_PERFTRACING
// Finish setting up rest of EventPipe - specifically enable SampleProfiler if it was requested at startup.
Expand Down
2 changes: 2 additions & 0 deletions src/coreclr/vm/finalizerthread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ void FinalizerThread::EnableFinalization()
{
WRAPPER_NO_CONTRACT;

#ifndef TARGET_WASM
hEventFinalizer->Set();
#endif // !TARGET_WASM
}

namespace
Expand Down
2 changes: 2 additions & 0 deletions src/coreclr/vm/loaderallocator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1235,10 +1235,12 @@ void LoaderAllocator::Init(BYTE *pExecutableHeapMemory)

initReservedMem += dwStubHeapReserveSize;

#ifndef FEATURE_PORTABLE_ENTRYPOINTS
m_pNewStubPrecodeHeap = new (&m_NewStubPrecodeHeapInstance) InterleavedLoaderHeap(
&m_stubPrecodeRangeList,
false /* fUnlocked */,
&s_stubPrecodeHeapConfig);
#endif // FEATURE_PORTABLE_ENTRYPOINTS

#if defined(FEATURE_STUBPRECODE_DYNAMIC_HELPERS) && defined(FEATURE_READYTORUN)
if (IsCollectible())
Expand Down
Loading