Add CI coverage for the exported CLRMA `!analyze` path (dbgeng, out of command scope)

Abierto
#5,947 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
cpp

Línea de trabajo

Revisa Microsoft.Diagnostics.DebugServices.UnitTests.csproj y ConfigFiles/Windows/Debugger.Tests.Config.txt; después inspecciona ClrmaTests y BangAnalyzeTests junto con issue #3111. Evalúa si se puede habilitar un depurador capaz de usar ext.dll o si se debe utilizar un harness nativo para llamar a CLRMACreateInstance y AssociateClient sin command scope. Se considera completado cuando CI ejercita la ruta real out-of-command-scope y bloquea el fallo por g_Ext*-null.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.dll in the test debugger package. The cdb-sos package (10.0.26100.1) used by the tests ships only dbgcore/dbgeng/dbghelp/DbgModel/symsrv - no ext.dll, so !analyze fails with "No export analyze found". DbgEngPath in Microsoft.Diagnostics.DebugServices.UnitTests.csproj points at this same package.
  • TestDbgEng harness is disabled. The <TestDbgEng>true</TestDbgEng> config blocks in ConfigFiles/Windows/Debugger.Tests.Config.txt are commented out (tracked by #3111), so ClrmaTests/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 scoped TestDbgEng configuration (see #3111) so !analyze -v can run against a managed crash dump.
  • Alternatively, add a small native test harness that calls the exported CLRMACreateInstance + AssociateClient directly with no active command (mirroring ext!CLRMACreateCached), asserting no fault when the command-scoped globals are null.

References

  • Fix: #5946
  • Regression origin: #4667
  • Related disabled harness: #3111
Lenguaje dominante
C++
Estrellas
1.3k
Forks
407
Merge medio
21 h 5 min
PR fusionados (30 d)
78

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

  • Sin Dockerfile ni archivo de Docker Compose
  • Sin plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de dotnet/diagnostics

Todos los issues de dotnet/diagnostics

Issues similares

Más issues de C++

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.