diff options
author | joerg <joerg@pkgsrc.org> | 2013-04-01 12:12:47 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2013-04-01 12:12:47 +0000 |
commit | 3d2df879e97a8868c8eabc1db00a4520188949b7 (patch) | |
tree | 5269fef0b4710ea2b724346c9f7a74bf3f9f1c15 /lang | |
parent | 8d082a5a698b274b1cc25975ea85a94c447a1ee3 (diff) | |
download | pkgsrc-3d2df879e97a8868c8eabc1db00a4520188949b7.tar.gz |
Fix assertions on NetBSD when trying to use a thread-specific storage
key after it has been removed. Bump revision.
Diffstat (limited to 'lang')
-rw-r--r-- | lang/mono/Makefile | 4 | ||||
-rw-r--r-- | lang/mono/distinfo | 5 | ||||
-rw-r--r-- | lang/mono/patches/patch-dg | 53 |
3 files changed, 54 insertions, 8 deletions
diff --git a/lang/mono/Makefile b/lang/mono/Makefile index 9512328eb89..fc9983daed0 100644 --- a/lang/mono/Makefile +++ b/lang/mono/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.132 2013/02/19 22:34:09 joerg Exp $ +# $NetBSD: Makefile,v 1.133 2013/04/01 12:12:47 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 diff --git a/lang/mono/distinfo b/lang/mono/distinfo index 6cfbb0ddb0b..95b9add0a64 100644 --- a/lang/mono/distinfo +++ b/lang/mono/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.87 2013/01/19 14:38:26 wiz Exp $ +$NetBSD: distinfo,v 1.88 2013/04/01 12:12:47 joerg Exp $ SHA1 (mono-2.10.9.tar.bz2) = 1a6e8c5a0c3d88d87982259aa04402e028a283de RMD160 (mono-2.10.9.tar.bz2) = ac9784c413eb2cdb490750a86a96cce5c11ad5bd @@ -33,7 +33,8 @@ SHA1 (patch-db) = 80e64ed5e475d7292eaea16decc1dd5a8123d5e0 SHA1 (patch-dc) = e139e349217b213eea53a17fcae44fda0bbfe636 SHA1 (patch-de) = d9867210a90389ff9ff5b9376b7091f923960973 SHA1 (patch-df) = b817bb4dd09c4490efba749bf9c4a663253da11b -SHA1 (patch-dg) = d6af013f17f293485ed8740e284f44a53467391e +SHA1 (patch-dg) = 9e87267c6a85dd6f1f445eb303e8c2a40b57e39b +SHA1 (patch-dg.diff) = c2218062c6d261fa44cc9a2664de8fd158462e19 SHA1 (patch-dh) = 9d1603cb55658a378cf4af29e41d6215f6a080c9 SHA1 (patch-di) = 925b26e848f5f25376a21948d0627e987cfaa467 SHA1 (patch-dj) = acff1ca9b38b1c21ed545bcd4fb806c69e40c409 diff --git a/lang/mono/patches/patch-dg b/lang/mono/patches/patch-dg index 57d8a275399..ffd49ef4d9a 100644 --- a/lang/mono/patches/patch-dg +++ b/lang/mono/patches/patch-dg @@ -1,7 +1,36 @@ -$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 +$NetBSD: patch-dg,v 1.5 2013/04/01 12:12:47 joerg Exp $ + +Avoid calling pthread_setspecific via SET_CURRENT_OBJECT(NULL) +after the key has been removed. This can result in hangs or +assertions. + +--- 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 @@ -18,3 +47,19 @@ $NetBSD: patch-dg,v 1.4 2011/04/25 14:01:40 kefren Exp $ # 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 (¤t_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 |