Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
GitHub or Developer Community with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Created attachment 2664 [details]
Compile attached sample
mono -O=-gshared test-996.exe
I tried to reproduce it with C# alone but cannot, so it looks like it's somehow related to 2 struct fields not being initialised.
.field private valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter '<>u__$awaiter1'
.field private object '<>t__stack'
*** Bug 7463 has been marked as a duplicate of this bug. ***
The problem here is the layout of the <AsyncWithAwait>d__0`1<T> type used by the non-gshared method is not the same as the
<AsyncWithAwait>d__0`1 type used by the gshared method.
Working on it.
Fixed on trunk. 2a899eb83cb8b4888184aa60469cc4835795b688