[Mono-dev] PrelinkAll leads to assertion failure

Zoltan Varga vargaz at gmail.com
Tue Jan 3 14:42:07 EST 2012


Hi,

  This is now fixed in HEAD/2.10 branch.

                    Zoltan

On Tue, Jan 3, 2012 at 1:34 PM, Martin Däumler <mdae at cs.tu-chemnitz.de>wrote:

> Hello,
>
> I wanted to use Marshal.PrelinkAll() in order to pre-initialize a
> PInvoke. Unfortunately, executing this method leads to an assertion
> failure on x86/Linux. The C# code is quite simple:
>
> using System;
> using System.Runtime.InteropServices;
> class Test1
> {
>        [DllImport("libpinvoke")]
>        public static extern int pinvoke(int value);
>
>        static void Main (string[] args)
>        {
>                Marshal.PrelinkAll(typeof(Test1));
>                int ret = pinvoke(1);
>                Console.WriteLine("return value: " + ret.ToString());
>        }
> }
>
> .. as well as the library code (pinvoke.c):
>
> int pinvoke( int value ) {
>        return value;
> }
>
> The full example including Makefile can be downloaded [1].
> Surprisingly, the assertion is raised by Mono 2.6.1 and
> 2.10.7, but not by Mono 2.8.2 (the versions I tested).
> Further, the assertion is not raised when the C# code
> was AOT-compiled in advance (works with each tested Mono
> version).
>
> Is it a bug or a feature?
>
>
> With kind regards,
> Martin Däumler
>
>
> [1] http://www-user.tu-chemnitz.de/~mdae/PrelinkAllTest.tar
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20120103/e98a52e2/attachment.html 


More information about the Mono-devel-list mailing list