From bbd8d8aee170470e92281df1c752803087ff9394 Mon Sep 17 00:00:00 2001 From: David Mason Date: Thu, 14 Sep 2023 20:24:23 -0700 Subject: [PATCH] Add SHUTDOWNGUARD to NonGcHeapProfiler::ObjectAllocated (#92096) --- src/tests/profiler/native/nongcheap/nongcheap.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tests/profiler/native/nongcheap/nongcheap.cpp b/src/tests/profiler/native/nongcheap/nongcheap.cpp index 67dcde1a0e561..6db85166929f8 100644 --- a/src/tests/profiler/native/nongcheap/nongcheap.cpp +++ b/src/tests/profiler/native/nongcheap/nongcheap.cpp @@ -29,6 +29,8 @@ HRESULT NonGcHeapProfiler::Initialize(IUnknown* pICorProfilerInfoUnk) HRESULT STDMETHODCALLTYPE NonGcHeapProfiler::ObjectAllocated(ObjectID objectId, ClassID classId) { + SHUTDOWNGUARD(); + COR_PRF_GC_GENERATION_RANGE gen; HRESULT hr = pCorProfilerInfo->GetObjectGeneration(objectId, &gen);