[mono] Avoid an assertion when cattrs with array parameters are const…#69077
[mono] Avoid an assertion when cattrs with array parameters are const…#69077vargaz merged 1 commit intodotnet:mainfrom
Conversation
…ructed during AOT. Fixes dotnet#57361.
| for (i = 0; i < alen; i++) { | ||
| MonoObject *item = NULL; | ||
| load_cattr_value (image, m_class_get_byval_arg (tklass), &item, p, boundp, &p, error); | ||
| if (!is_ok (error)) | ||
| return NULL; | ||
| } |
There was a problem hiding this comment.
This doesn't really fix the root issue (#52977), it just reads the values and throws them away.
I think @SamMonoRT wanted @ivanpovazan to work on a proper fix.
We do care about this on non-windows platforms, by the way. we might want to support [UnmanagedCallersOnly (CallConvs = new Type[] {CallConvCdecl, CallConvSuppressGCTransition})], for example.
I guess this is ok if it unblocks #57361 if we want to do that quickly for now
There was a problem hiding this comment.
This should be ok for a quick fix to unblock 57361. @ivanpovazan will work on a proper fix and maybe change this temporary fix during that time. He'll start investigating this sometime this week.
|
Failures are unrelated. |
|
Does this mean that I can get rid of all the Mono AOT exclusions in #69009? If yes, then thanks a lot!!!! |
|
Its possible if they failed with the same error. |
…s are constructed during AOT. (dotnet#69077)" since 'load_cattr_value' is not used anymore during AOT compiling This reverts commit d2a7a6d.
…ructed during AOT.
Fixes #57361.