Skip to content

Commit cc2cb04

Browse files
authored
Couple of debug info test fixes (dotnet#62199)
It looks like in CI we are seeing a null method ID in some cases when this test is run under R2R and GC stress. Add a check for this, and also mark the test as stress incompatible like other ETW tests, since it runs very slowly under stress modes. Fix dotnet#62118
1 parent 7ffc96e commit cc2cb04

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/tests/JIT/Directed/debugging/debuginfo/tester.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ private static Func<int> ValidateMappings(EventPipeEventSource source)
6464
source.Clr.MethodLoadVerbose += e => methodTier[e.MethodID] = e.OptimizationTier;
6565
source.Clr.MethodILToNativeMap += e =>
6666
{
67+
if (e.MethodID == 0)
68+
return;
69+
6770
var mappings = new (int, int)[e.CountOfMapEntries];
6871
for (int i = 0; i < mappings.Length; i++)
6972
mappings[i] = (e.ILOffset(i), e.NativeOffset(i));

src/tests/JIT/Directed/debugging/debuginfo/tester.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
<DebugType>PdbOnly</DebugType>
55
<Optimize>True</Optimize>
66
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
7+
<UnloadabilityIncompatible>true</UnloadabilityIncompatible>
8+
<GCStressIncompatible>true</GCStressIncompatible>
79
</PropertyGroup>
810
<ItemGroup>
911
<ProjectReference Include="tests_d.ilproj" Aliases="tests_d" />

0 commit comments

Comments
 (0)