-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test failure JIT\\Stress\\ABI\\pinvokes_d\\pinvokes_d.cmd #66745
Comments
Small repro: using System;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Runtime.Loader;
public class Program
{
public static void Main()
{
CollectibleALC alc = new CollectibleALC();
Assembly asm = alc.LoadFromAssemblyPath(Assembly.GetExecutingAssembly().Location);
MethodInfo mi = asm.GetType(typeof(Program).FullName).GetMethod("MainInner");
mi.Invoke(null, null);
}
public static void MainInner()
{
CalleeDelegate callee = Callee;
callee(default);
GC.KeepAlive(callee);
}
private static int Callee(S32U s)
{
return 0;
}
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
private delegate int CalleeDelegate(S32U s);
public struct S32U { public byte F0, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24, F25, F26, F27, F28, F29, F30, F31; }
private class CollectibleALC : AssemblyLoadContext
{
public CollectibleALC() : base(true)
{
}
}
} The problem is that for collectible ALCs we end up using the heap here to place shuffle thunks: runtime/src/coreclr/vm/loaderallocator.cpp Line 1668 in ac84ea6
This heap does not have runtime/src/coreclr/vm/stublink.cpp Line 2129 in ac84ea6
|
I am not sure what the intention of the flag is, whether it is just to validate that we only place unwind info in expected places, or whether there is an actual problem with putting the unwind information in other heaps. From what I understand, on 64-bit the pointers to unwind information are 32-bit offsets so are relative to a base address, and thus the unwind information cannot be placed arbitrarily, so here it might be a problem. I am not sure if 32-bit has similar problems. My question is whether the flag should be set on that heap or whether we should disable emitting unwind information for shuffle thunks in that heap. There is a todo about changing away from using that heap for shuffle thunks, so fixing that might solve the problem in a better way in the future. |
@AaronRobinsonMSFT could you please take a look at this. Its arm32 only so perhaps moving to 8 might be ok. |
Not even that but it is also win-arm32 only, so moving it should definitely be fine given that this is not a supported configuration. |
Good point @jakobbotsch. |
Hi @jakobbotsch does this still repro? |
We can close this one given that win-arm is unsupported and now removed from our testing. |
Run: runtime-coreclr outerloop 20220316.3
Failed test:
Error message:
The text was updated successfully, but these errors were encountered: