-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed
Labels
Milestone
Description
pinvoke stress on arm32 fails with an assert failure:
Assert failure(PID 46 [0x0000002e], Thread: 46 [0x002e]): dwSrcIndex > dwLastSrcIndex
File: /__w/2/s/src/vm/arm/stubs.cpp Line: 1558
Image: /root/helix/work/correlation/corerun
/root/helix/work/workitem/JIT/Stress/ABI/pinvokes_do/pinvokes_do.sh: line 271: 46 Aborted $LAUNCHER $ExePath "${CLRTestExecutionArguments[@]}"
Return code: 1
Raw output file: /root/helix/work/workitem/JIT/Stress/Reports/JIT.Stress/ABI/pinvokes_do/pinvokes_do.output.txt
Raw output:
BEGIN EXECUTION
/root/helix/work/correlation/corerun pinvokes_do.exe '--pinvokes' '--num-calls' '1000' '--no-ctrlc-summary'
Stressing pinvokes
OSVersion: Unix 4.4.38.0
OSArchitecture: Arm
ProcessArchitecture: Arm
Selecting armhf ABI.
50 callers done
100 callers done
Expected: 100
Actual: 134
END EXECUTION - FAILED
Test Harness Exitcode is : 1
To run the test:
> set CORE_ROOT=/root/helix/work/correlation
> /root/helix/work/workitem/JIT/Stress/ABI/pinvokes_do/pinvokes_do.sh
Small self-contained example:
using System;
using System.Runtime.InteropServices;
public class Program
{
public static void Main()
{
CalleeDelegate callee = Callee;
callee(default, default, default, default, default, default);
GC.KeepAlive(callee);
}
private static int Callee(Hfa1 a1, S1P a2, Hfa2 a3, Hfa2 a4, S9U a5, S11U a6)
{
return 0;
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
private delegate int CalleeDelegate(Hfa1 a1, S1P a2, Hfa2 a3, Hfa2 a4, S9U a5, S11U a6);
public struct S1P { public byte F0; }
public struct S9U { public byte F0, F1, F2, F3, F4, F5, F6, F7, F8; }
public struct S11U { public byte F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10; }
public struct Hfa1 { public float F0, F1; }
public struct Hfa2 { public double F0, F1, F2, F3; }
}category:correctness
theme:pinvoke
skill-level:intermediate
cost:medium