Author: lupus
Date: 2006-09-11 07:12:01 -0400 (Mon, 11 Sep 2006)
New Revision: 65222
Modified:
trunk/mono/mono/mini/ChangeLog
trunk/mono/mono/mini/mini.c
Log:
Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <[EMAIL PROTECTED]>
* mini.c: handle cases where pthread_attr_getstack() behaves
incorrectly (bug #78096).
Modified: trunk/mono/mono/mini/ChangeLog
===================================================================
--- trunk/mono/mono/mini/ChangeLog 2006-09-11 11:07:12 UTC (rev 65221)
+++ trunk/mono/mono/mini/ChangeLog 2006-09-11 11:12:01 UTC (rev 65222)
@@ -1,4 +1,9 @@
+Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <[EMAIL PROTECTED]>
+
+ * mini.c: handle cases where pthread_attr_getstack() behaves
+ incorrectly (bug #78096).
+
Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <[EMAIL PROTECTED]>
* mini-arm.c: support larger stack frames (bug #79272).
Modified: trunk/mono/mono/mini/mini.c
===================================================================
--- trunk/mono/mono/mini/mini.c 2006-09-11 11:07:12 UTC (rev 65221)
+++ trunk/mono/mono/mini/mini.c 2006-09-11 11:12:01 UTC (rev 65222)
@@ -7863,7 +7863,7 @@
} StackSlotInfo;
/*
- * mono_allocate_stack_slots_full:
+ * mono_allocate_stack_slots_full:
*
* Allocate stack slots for all non register allocated variables using a
* linear scan algorithm.
@@ -11035,7 +11035,17 @@
* GC_register_stackbottom as well, but don't know how.
*/
#else
- GC_stackbottom = (char*)sstart + size;
+ /* apparently with some linuxthreads implementations sstart can
be NULL,
+ * fallback to the more imprecise method (bug# 78096).
+ */
+ if (sstart) {
+ GC_stackbottom = (char*)sstart + size;
+ } else {
+ gsize stack_bottom = (gsize)&domain;
+ stack_bottom += 4095;
+ stack_bottom &= ~4095;
+ GC_stackbottom = (char*)stack_bottom;
+ }
#endif
}
#elif defined(HAVE_PTHREAD_GET_STACKSIZE_NP) &&
defined(HAVE_PTHREAD_GET_STACKADDR_NP)
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches