[mono/mono] fe80190f: [runtime] Fix the osx mavericks stack size calculation in sgen too.
| Newsgroups | gmane.comp.gnome.mono.patches |
|---|---|
| Message-ID | <0000014229b580cd-a31b9293-2abc-4900-b0af-cf597e10247e-000000@email.amazonses.com> |
Branch: refs/heads/master
Home: https://github.com/mono/mono
Compare: https://github.com/mono/mono/compare/d6673ca8ec85...fe80190fc4d2
Commit: fe80190fc4d2f880c92f06ecc94aa33d1ecbacb6
Author: Zoltan Varga <[email protected]> (vargaz)
Date: 2013-11-05 19:18:14 GMT
URL: https://github.com/mono/mono/commit/fe80190fc4d2f880c92f06ecc94aa33d1ecbacb6
[runtime] Fix the osx mavericks stack size calculation in sgen too.
Changed paths:
M mono/metadata/sgen-gc.c
Modified: mono/metadata/sgen-gc.c
===================================================================
@@ -4091,6 +4091,7 @@ struct _EphemeronLinkNode {
binary_protocol_thread_register ((gpointer)mono_thread_info_get_tid (info));
+ // FIXME: Unift with mono_thread_get_stack_bounds ()
/* try to get it with attributes first */
#if (defined(HAVE_PTHREAD_GETATTR_NP) || defined(HAVE_PTHREAD_ATTR_GET_NP)) && defined(HAVE_PTHREAD_ATTR_GETSTACK)
{
@@ -4115,8 +4116,14 @@ struct _EphemeronLinkNode {
pthread_attr_destroy (&attr);
}
#elif defined(HAVE_PTHREAD_GET_STACKSIZE_NP) && defined(HAVE_PTHREAD_GET_STACKADDR_NP)
- info->stack_end = (char*)pthread_get_stackaddr_np (pthread_self ());
- info->stack_start_limit = (char*)info->stack_end - pthread_get_stacksize_np (pthread_self ());
+ {
+ size_t stsize = 0;
+ guint8 *staddr = NULL;
+
+ mono_thread_get_stack_bounds (&staddr, &stsize);
+ info->stack_start_limit = staddr;
+ info->stack_end = staddr + stsize;
+ }
#else
{
/* FIXME: we assume the stack grows down */
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches