Bug 10122 - References to generic fields from other assemblies compiled incorrectly by smcs
Summary: References to generic fields from other assemblies compiled incorrectly by smcs
Alias: None
Product: iOS
Classification: Xamarin
Component: Pre-release ()
Version: 6.2.x
Hardware: PC Mac OS
: --- major
Target Milestone: Untriaged
Assignee: Rodrigo Kumpera
Depends on:
Reported: 2013-02-07 07:39 UTC by Rolf Bjarne Kvinge [MSFT]
Modified: 2013-02-08 12:08 UTC (History)
4 users (show)

Tags: ui-refresh
Is this bug a regression?: ---
Last known good build:

test.sh (1.15 KB, application/octet-stream)
2013-02-07 07:39 UTC, Rolf Bjarne Kvinge [MSFT]

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and 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 Links.

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 Developer Community or GitHub 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.

Related Links:

Description Rolf Bjarne Kvinge [MSFT] 2013-02-07 07:39:01 UTC
Created attachment 3340 [details]

I've attached a test case.

The test case compiles into an invalid binary for both MT 6.0 and 6.2, but there's a difference between 6.0 and 6.2 that causes trouble for MT's linker [1] - this bug is about that difference (i.e. there is an smcs regression between MT 6.0 and 6.2).

MT 6.0 produces the following IL:
ldfld class [System]System.Collections.Generic.LinkedList`1<!0> class [a]ObjectListDiff`1<class [a]ISectionItem>::Changed

MT 6.2 produces the following IL:
ldfld class [System]System.Collections.Generic.LinkedList`1<class [a]ISectionItem> class [a]ObjectListDiff`1<class [a]ISectionItem>::Changed

Note that monodis can't be used to see this, because it doesn't output any IL at all for the method in question.

Also note that mcs from master produces a valid binary - this is just about the regression between 6.0 and 6.2.

[1]: http://forums.xamarin.com/discussion/1080/our-app-doesnt-compile-for-the-device-using-monomt-shipped-with-xs
Comment 2 Rodrigo Kumpera 2013-02-07 08:12:45 UTC
Comment 3 Marek Safar 2013-02-07 10:56:33 UTC
smcs is dead, there has been no change for years now.

The regression is most likely caused by corlib/runtime changes

Could it be

Comment 4 Rodrigo Kumpera 2013-02-07 12:40:30 UTC
That commit is not been used by MT's smcs.

I'm bisecting this puppy.
Comment 5 Rodrigo Kumpera 2013-02-08 12:08:38 UTC
Fixed on everywhere.