[mono/mono] d6673ca8: [runtime] Fix stack size detection on osx mavericks. Fixes #15890.
| Newsgroups | gmane.comp.gnome.mono.patches |
|---|---|
| Message-ID | <00000142299e75a0-208654c1-62ab-49f7-94c9-c69d9a1943dd-000000@email.amazonses.com> |
Branch: refs/heads/master
Home: https://github.com/mono/mono
Compare: https://github.com/mono/mono/compare/33663b2db833...d6673ca8ec85
Commit: d6673ca8ec854f291eb32c048446b3868b92de7a
Author: Zoltan Varga <[email protected]> (vargaz)
Date: 2013-11-05 18:53:22 GMT
URL: https://github.com/mono/mono/commit/d6673ca8ec854f291eb32c048446b3868b92de7a
[runtime] Fix stack size detection on osx mavericks. Fixes #15890.
Changed paths:
M configure.in
M mono/metadata/threads.c
Modified: configure.in
===================================================================
@@ -315,10 +315,8 @@ case "$host" in
CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC $BROKEN_DARWIN_FLAGS"
CPPFLAGS_FOR_EGLIB="$CPPFLAGS_FOR_EGLIB $BROKEN_DARWIN_CPPFLAGS"
CFLAGS_FOR_EGLIB="$CFLAGS_FOR_EGLIB $BROKEN_DARWIN_FLAGS"
- extra_runtime_ldflags="-Xlinker -stack_size -Xlinker 0x800000"
;;
x*64-*-darwin*)
- extra_runtime_ldflags="-Xlinker -stack_size -Xlinker 0x800000"
;;
arm*-darwin*)
has_dtrace=no
Modified: mono/metadata/threads.c
===================================================================
@@ -850,6 +850,17 @@ static __inline__ __attribute__((always_inline))
*staddr = (guint8*)pthread_get_stackaddr_np (pthread_self());
*stsize = pthread_get_stacksize_np (pthread_self());
+
+#ifdef TARGET_OSX
+ /*
+ * Mavericks reports stack sizes as 512kb:
+ * http://permalink.gmane.org/gmane.comp.java.openjdk.hotspot.devel/11590
+ * https://bugs.openjdk.java.net/browse/JDK-8020753
+ */
+ if (*stsize == 512 * 1024)
+ *stsize = 2048 * mono_pagesize ();
+#endif
+
/* staddr points to the start of the stack, not the end */
*staddr -= *stsize;
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches