Bug 31231 - Crash with generics makeref
Summary: Crash with generics makeref
Alias: None
Product: Runtime
Classification: Mono
Component: JIT ()
Version: unspecified
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2015-06-18 15:44 UTC by Marek Safar
Modified: 2015-06-23 22:15 UTC (History)
3 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 Marek Safar 2015-06-18 15:44:44 UTC
using System;
    class Program
        struct S1<T>
            public T x;

            public void Assign(T i)
                x = i;

        static void Main(string[] args)
            int x = 0;
            var _ref = __makeref(x);

            S1<int> s = new S1<int>();
            _ref = __makeref(s);
            __refvalue(_ref, S1<int>).Assign(333);

When executed on Mono

Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
Comment 1 Zoltan Varga 2015-06-23 22:15:46 UTC
Fixed in master/4.2.