Open Powerlated opened 4 years ago
OpenTK assembly contains invalid IL:
.method public hidebysig static void
ExtGetProgramBinarySource(int32 program,
valuetype OpenTK.Graphics.ES30.All shadertype,
[out] string& source,
[out] int32[] length) cil managed
{
.maxstack 7
.locals init (native int V_0,
int32 V_1,
int32& pinned V_2)
IL_0000: ldarg.0
IL_0001: ldarg.1
IL_0002: ldarg.2
IL_0003: pop
IL_0004: ldarg.3 <- the type of 3rd argument is `int32[]`
IL_0005: ldind.i4 <- ldind.i4 on `int32[]` is invalid IL operation
...
(This is just one example. There are more.)
It is crashing the JIT with CORJIT_INTERNALERROR
and in turn crashing the compiler.
OpenTK project is using IL generator https://github.com/opentk/opentk/tree/master/src/Generator.Rewrite that seems to be responsible for the invalid IL.
We should look into reporting this error in a better way, but the underlying problem should be fixed in OpenTK project. @Powerlated Could you please open an issue on this in OpenTK project?
I am attempting to
dotnet publish -r win-x64 -c Release
a program and I receieve this error after theGenerating compatible native code.
message.