Raw profiler hook fails because of a null ref
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Bắt đầu tại CCorProfilerInfoWrapper::GetILFunctionBody và theo dõi trạng thái của CMethodInfo sau SetFinalRenderedFunctionBody, đặc biệt là mối quan hệ giữa m_bIsInstrumented, m_pIntermediateRenderedMethod và m_pFinalRenderedMethod. So sánh thay đổi được đề xuất cho SetFinalRenderedFunctionBody với issue 370 và commit được tham chiếu. Được xem là hoàn tất khi việc viết lại bằng raw-profiler không còn tạo ra tham chiếu null hoặc HRESULT lỗi và lấy được thân phương thức hợp lệ.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- C++
- Star
- 105
- Fork
- 53
- Merge trung bình
- 3 ngày 14 giờ
- Pull request đã merge (30 ngày)
- 4
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/CLRInstrumentationEngine
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
microsoft/CLRInstrumentationEngine#169 · 2 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
microsoft/CLRInstrumentationEngine#526 · 1 reaction ·
-
bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
Tất cả issue của microsoft/CLRInstrumentationEngine
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 91/100
FujiNetWIFI/fujinet-firmware#2045 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
(S1 - Need confirmation)
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
CleverRaven/Cataclysm-DDA#89159 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:libnvmpi bug P3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
gjrtimmer/jetson-nvmpi#33 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug(wasi_crypto): ArrayOutput::pull reports the wrong all-pulled flagCó thể đã có người làm @Yashbhu đã nhận hôm nay. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày