tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

lang/mono patch for testing



Hi all,
the attached patch avoids crashing due to assertions on NetBSD/current
and it might help with a number of other cases of Mono spinning. Please
give it a try.

Joerg
Index: lang/mono/Makefile
==================================================================
--- lang/mono/Makefile
+++ lang/mono/Makefile
@@ -1,9 +1,9 @@
 # $NetBSD: Makefile,v 1.132 2013/02/19 22:34:09 joerg Exp $
 
 DISTNAME=      mono-2.10.9
-PKGREVISION=   1
+PKGREVISION=   2
 CATEGORIES=    lang
 MASTER_SITES=  http://download.mono-project.com/sources/mono/
 EXTRACT_SUFX=  .tar.bz2
 
 MAINTAINER=    kefren%NetBSD.org@localhost
Index: lang/mono/distinfo
==================================================================
--- lang/mono/distinfo
+++ lang/mono/distinfo
@@ -31,11 +31,11 @@
 SHA1 (patch-da) = ec2299928595710331f1856450e46e1694b5c292
 SHA1 (patch-db) = 80e64ed5e475d7292eaea16decc1dd5a8123d5e0
 SHA1 (patch-dc) = e139e349217b213eea53a17fcae44fda0bbfe636
 SHA1 (patch-de) = d9867210a90389ff9ff5b9376b7091f923960973
 SHA1 (patch-df) = b817bb4dd09c4490efba749bf9c4a663253da11b
-SHA1 (patch-dg) = d6af013f17f293485ed8740e284f44a53467391e
+SHA1 (patch-dg) = d426699e5f93548f277b2f0cbe5a78a63885083f
 SHA1 (patch-dh) = 9d1603cb55658a378cf4af29e41d6215f6a080c9
 SHA1 (patch-di) = 925b26e848f5f25376a21948d0627e987cfaa467
 SHA1 (patch-dj) = acff1ca9b38b1c21ed545bcd4fb806c69e40c409
 SHA1 (patch-dk) = 7111c77894ff94264e668019d1010f659350f2cd
 SHA1 (patch-dl) = fc9cd48c070dbecad68cfe7d45eea59a3e6023d9

Index: lang/mono/patches/patch-dg
==================================================================
--- lang/mono/patches/patch-dg
+++ lang/mono/patches/patch-dg
@@ -1,9 +1,33 @@
 $NetBSD: patch-dg,v 1.4 2011/04/25 14:01:40 kefren Exp $
---- mono/metadata/threads.c.orig       2011-02-23 21:21:01.000000000 +0200
-+++ mono/metadata/threads.c    2011-04-25 12:32:08.000000000 +0300
-@@ -1002,8 +1002,16 @@ mono_thread_get_stack_bounds (guint8 **s
+--- mono/metadata/threads.c.orig       2012-01-30 18:01:23.000000000 +0000
++++ mono/metadata/threads.c
+@@ -1,3 +1,4 @@
++
+ /*
+  * threads.c: Thread support internal calls
+  *
+@@ -77,6 +78,8 @@ extern int tkill (pid_t tid, int signal)
+ #   endif
+ #endif
+ 
++static int tls_key_initialised;
++
+ struct StartInfo 
+ {
+       guint32 (*func)(void *);
+@@ -814,7 +817,8 @@ static guint32 WINAPI start_wrapper_inte
+        * Boehm GC - the io-layer keeps a GC-visible hash of pointers
+        * to TLS data.)
+        */
+-      SET_CURRENT_OBJECT (NULL);
++      if (tls_key_initialised)
++              SET_CURRENT_OBJECT (NULL);
+       mono_domain_unset ();
+ 
+       return(0);
+@@ -1016,8 +1020,16 @@ mono_thread_get_stack_bounds (guint8 **s
  #    if !defined(__OpenBSD__)
        pthread_attr_getstack (&attr, (void**)staddr, stsize);
  #    endif
 +      /*
 +       * he%NetBSD.org@localhost: For some reason, this test fails on 
NetBSD/powerpc,
@@ -16,5 +40,21 @@
                g_assert ((current > *staddr) && (current < *staddr + *stsize));
 +#   endif
  #  endif
  
        pthread_attr_destroy (&attr);
+@@ -2651,6 +2663,7 @@ void mono_thread_init (MonoThreadStartCB
+       mono_init_static_data_info (&context_static_info);
+ 
+       mono_native_tls_alloc (&current_object_key, NULL);
++      tls_key_initialised = 1;
+       THREAD_DEBUG (g_message ("%s: Allocated current_object_key %d", 
__func__, current_object_key));
+ 
+       mono_thread_start_cb = start_cb;
+@@ -2701,6 +2714,7 @@ void mono_thread_cleanup (void)
+       delayed_free_table = NULL;
+ 
+       mono_native_tls_free (current_object_key);
++      tls_key_initialised = 0;
+ }
+ 
+ void



Home | Main Index | Thread Index | Old Index