Raw profiler hook fails because of a null ref
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
Parti da CCorProfilerInfoWrapper::GetILFunctionBody e segui lo stato di CMethodInfo dopo SetFinalRenderedFunctionBody, in particolare la relazione tra m_bIsInstrumented, m_pIntermediateRenderedMethod e m_pFinalRenderedMethod. Confronta la modifica proposta a SetFinalRenderedFunctionBody con l’issue 370 e il commit indicato. Il lavoro è completato quando la riscrittura di raw-profiler non produce più un riferimento nullo né un HRESULT di errore e recupera il corpo del metodo valido.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
This is somewhat relate to https://github.com/microsoft/CLRInstrumentationEngine/issues/370, as it seems impossible to test them separately, but I believe it a separate issue.
It seems if a raw profiler chooses to rewrite a method but it hasn't been rewritten by an instrumentation method then an null ref will occur, or rather the functions will start to return fail HRESULTs because of a null ref.
For an existing method that has been instrumented by the raw profiler but not an instrumentation method CCorProfilerInfoWrapper::GetILFunctionBody will call pMethodInfo->GetIntermediateRenderedFunctionBody. This because pMethodInfo->IsInstrumented() has been set when CMethodInfo::SetFinalRenderedFunctionBody was called.
This means that we're in a state where m_bIsInstrumented is true, m_pIntermediateRenderedMethod is null and m_pFinalRenderedMethod is set to a valid method body.
So, our CMethodInfo has a valid method body, but I'm not sure what the correct way to retrieve it.
One possible fix is to update CMethodInfo::SetFinalRenderedFunctionBody so that it sets m_pIntermediateRenderedMethod if it is not already set. I believe this works, but can't test it properly because of the other issue: https://github.com/robertpi/CLRInstrumentationEngine/commit/22b96b56ec69b1cdb74e9d0d5f3a73169385a923#diff-9025cfc4efbe6666f69f6103e8d4aca595e5107e7c0ec46d644b3f34345717c9R1314
There maybe other better ways to fix this.
- Lingua principale
- C++
- Stelle
- 105
- Fork
- 53
- Merge medio
- 3g 14h
- PR unite (30g)
- 4
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di microsoft/CLRInstrumentationEngine
-
documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
microsoft/CLRInstrumentationEngine#169 · 2 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
microsoft/CLRInstrumentationEngine#526 · 1 reazione ·
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
Tutte le issue di microsoft/CLRInstrumentationEngine
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
I maintainer di solito rispondono entro 1 giorno
-
3.7.6-dev commit 80481ea - files not centered when resolution differs and zoom = "pixel-to-pixel"Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
grizzlypeak3d/DJV#931 ·
-
bug 🔥 pharesee
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
bug tooling
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
BoundedVector::insert assigns to slots that were never constructedForse già presa @auraseb l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
philips-software/amp-embedded-infra-lib#1379 ·
I maintainer di solito rispondono entro 2 giorni