Add CI coverage for the exported CLRMA `!analyze` path (dbgeng, out of command scope)
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- cpp
- 领域
- devtools, testing-qa
调研方向
检查 Microsoft.Diagnostics.DebugServices.UnitTests.csproj 和 ConfigFiles/Windows/Debugger.Tests.Config.txt,然后结合 issue #3111 检查 ClrmaTests 和 BangAnalyzeTests。评估启用支持 ext.dll 的调试器,或使用 native harness 在没有 command scope 的情况下调用 CLRMACreateInstance 和 AssociateClient。完成标准是 CI 执行真实的 out-of-command-scope 路径,并阻止 g_Ext*-null 崩溃。
由索引模型根据 Issue 内容生成。
描述
Background
PR #5946 fixed a crash on the native (non-hosted) CLRMA path where the exported CLRMACreateInstance (invoked by dbgeng !analyze via ext!CLRMACreateCached) borrowed command-scoped g_Ext* debugger globals that are null outside a !command. Regression originated in #4667.
That PR added coverage that exercises the fixed native Target/DataTarget/Runtime object graph via !clrma under cdb with !SetHostRuntime -none. However, this does not reproduce the original crash, because the !clrma command runs in command scope (INIT_API_EXT() -> ExtQuery populates g_Ext* for the command's duration). The only trigger that runs outside command scope is dbgeng's !analyze, which we cannot exercise in CI today.
Why !analyze can't be tested in CI currently
- No
ext.dllin the test debugger package. Thecdb-sospackage (10.0.26100.1) used by the tests ships onlydbgcore/dbgeng/dbghelp/DbgModel/symsrv- noext.dll, so!analyzefails with "No export analyze found".DbgEngPathinMicrosoft.Diagnostics.DebugServices.UnitTests.csprojpoints at this same package. TestDbgEngharness is disabled. The<TestDbgEng>true</TestDbgEng>config blocks inConfigFiles/Windows/Debugger.Tests.Config.txtare commented out (tracked by #3111), soClrmaTests/BangAnalyzeTests(the only harness that issues!analyze) don't run in CI.
Ask
Add a test that drives CLRMA through the real out-of-command-scope entry point so the exact g_Ext*-null crash path is gated in CI. Options to evaluate:
- Provide an
ext.dll-capable debugger in the test assets (or a minimal harness) and re-enable a scopedTestDbgEngconfiguration (see #3111) so!analyze -vcan run against a managed crash dump. - Alternatively, add a small native test harness that calls the exported
CLRMACreateInstance+AssociateClientdirectly with no active command (mirroringext!CLRMACreateCached), asserting no fault when the command-scoped globals are null.
References
- Fix: #5946
- Regression origin: #4667
- Related disabled harness: #3111
- 主要语言
- C++
- 星标
- 1.3k
- 派生
- 407
- 平均合并
- 21 小时 5 分钟
- 30 天内合并 PR
- 78
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
dotnet/diagnostics 的其他 Issue
-
Fix StackAndOtherTests.script line number verification for .NET 11 and Windows x64可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 2/5 1-3 小时 新手友好度 65/100
dotnet/diagnostics#5884 · 2 条评论 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 25/100
dotnet/diagnostics#6225 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 48/100
dotnet/diagnostics#6213 ·
维护者通常 1 天内回复
-
Isolate SOS hosting from other debugger extensions that use managed code可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭bug
难度 5/5 一周以上 新手友好度 25/100
dotnet/diagnostics#6207 ·
维护者通常 1 天内回复
-
Known Build Error
难度 4/5 3-5 天 新手友好度 49/100
dotnet/diagnostics#6190 ·
维护者通常 1 天内回复
查看 dotnet/diagnostics 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
AutoHotkey/AutoHotkey#380 ·
-
documentation
难度 1/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 69/100
grumpycoders/pcsx-redux#2667 ·
-
GCC 15.2: -Wcast-qual warning - cast discards const qualifier from pointer target type (H5trace.c)未关闭
难度 2/5 1-3 小时 新手友好度 73/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 88/100
google/tensorstore#305 ·