Bug 3656 - mono_check_corlib_version() isn't sufficient
Summary: mono_check_corlib_version() isn't sufficient
Alias: None
Product: Runtime
Classification: Mono
Component: JIT ()
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2012-02-27 10:18 UTC by Eric Samsel
Modified: 2012-03-01 22:18 UTC (History)
4 users (show)

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

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 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.

Related Links:

Description Eric Samsel 2012-02-27 10:18:47 UTC
mono_check_corlib_version() looks like it's intended to catch a mismatch between the mono runtime version and the mono version of the framework libraries. However, at least in the case of 2.10.0 framework libraries and 2.10.2 mono runtime, this check isn't sufficient.

The mono runtime asserts before it gets to the mono_check_corlib_version() call. The problem is that mini_init() -> mono_runtime_init() -> mono_thread_pool_init() -> threadpool_init() -> mono_cq_create() -> mono_cqitem_alloc() occurs before the check, and mono_cqitem_alloc() tries to create an object of type System.MonoCQItem, which was added after 2.10.0.
Comment 1 Zoltan Varga 2012-03-01 22:18:24 UTC
The check needs a fully functional runtime to run so it cannot be ran earlier. It was never intented to catch all cases, just the most common ones.