diff --git a/src/SOS/Strike/strike.cpp b/src/SOS/Strike/strike.cpp index 2309e8173d..91d46be707 100644 --- a/src/SOS/Strike/strike.cpp +++ b/src/SOS/Strike/strike.cpp @@ -1317,7 +1317,7 @@ DECLARE_API(DumpMT) table.WriteRow("Entry", "MethodDesc", "JIT", "Slot", "Name"); - ToRelease pMethodEnumerator; + ISOSMethodEnum *pMethodEnumerator; if (SUCCEEDED(g_sos15->GetMethodTableSlotEnumerator(dwStartAddr, &pMethodEnumerator))) { SOSMethodData entry; diff --git a/src/SOS/Strike/util.cpp b/src/SOS/Strike/util.cpp index 28d5c9b1cd..30df0681e3 100644 --- a/src/SOS/Strike/util.cpp +++ b/src/SOS/Strike/util.cpp @@ -3644,7 +3644,7 @@ class SOSDacInterface15Simulator : public ISOSDacInterface15 unsigned int slotCount; ULONG refCount; public: - SOSMethodEnum(CLRDATA_ADDRESS mt) : pMT(mt), refCount(0) + SOSMethodEnum(CLRDATA_ADDRESS mt) : pMT(mt), refCount(1) { } @@ -3769,18 +3769,16 @@ class SOSDacInterface15Simulator : public ISOSDacInterface15 ISOSMethodEnum **enumerator) { SOSMethodEnum *simulator = new(std::nothrow) SOSMethodEnum(mt); + *enumerator = simulator; if (simulator == NULL) { return E_OUTOFMEMORY; } HRESULT hr = simulator->Reset(); - - if (SUCCEEDED(hr)) - hr = simulator->QueryInterface(__uuidof(ISOSMethodEnum), (void**)enumerator); - if (FAILED(hr)) - delete simulator; - + { + simulator->Release(); + } return hr; } } SOSDacInterface15Simulator_Instance; diff --git a/src/shared/inc/sospriv.idl b/src/shared/inc/sospriv.idl index ee768097ae..141f597dcb 100644 --- a/src/shared/inc/sospriv.idl +++ b/src/shared/inc/sospriv.idl @@ -444,7 +444,7 @@ interface ISOSDacInterface8 : IUnknown // Increment anytime there is a change in the data structures that SOS depends on like // stress log structs (StressMsg, StressLogChunck, ThreadStressLog, etc), exception // stack traces (StackTraceElement), the PredefinedTlsSlots enums, etc. -cpp_quote("#define SOS_BREAKING_CHANGE_VERSION 6") +cpp_quote("#define SOS_BREAKING_CHANGE_VERSION 5") [ object, diff --git a/src/shared/pal/prebuilt/inc/sospriv.h b/src/shared/pal/prebuilt/inc/sospriv.h index 360d714938..4ff12d95b7 100644 --- a/src/shared/pal/prebuilt/inc/sospriv.h +++ b/src/shared/pal/prebuilt/inc/sospriv.h @@ -2802,7 +2802,7 @@ EXTERN_C const IID IID_ISOSDacInterface8; /* interface __MIDL_itf_sospriv_0000_0012 */ /* [local] */ -#define SOS_BREAKING_CHANGE_VERSION 6 +#define SOS_BREAKING_CHANGE_VERSION 5 extern RPC_IF_HANDLE __MIDL_itf_sospriv_0000_0012_v0_0_c_ifspec;