summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRonald Oussoren <ronaldoussoren@mac.com>2009-11-19 16:25:21 (GMT)
committerRonald Oussoren <ronaldoussoren@mac.com>2009-11-19 16:25:21 (GMT)
commit315cd0c73939ff2b9a9dbef35986b129a0b3064e (patch)
treed4fdaacc67f9508f0b814a8f614e4ac7c9a0e358
parent39de1fc5c8715fa69d96501e100b360c3b56d22e (diff)
downloadcpython-315cd0c73939ff2b9a9dbef35986b129a0b3064e.zip
cpython-315cd0c73939ff2b9a9dbef35986b129a0b3064e.tar.gz
cpython-315cd0c73939ff2b9a9dbef35986b129a0b3064e.tar.bz2
Fix for issue #7085
On MacOSX 10.6 the CoreFoundation framework must be initialized on the main thread, the constructor function in that framework will cause an SIGABRT when it is called on any other thread. Because a number of extension link (indirectly) to CoreFoundation and the Python core itself didn't the interpreter crashed when importing some extensions, such as _locale, on a secondary thread. This fix ensures that Python is linked to CoreFoundation on OSX, which results in the CoreFoundation constructor being called when Python is loaded. This does not require code changes.
-rw-r--r--Misc/NEWS3
-rwxr-xr-xconfigure37
-rw-r--r--configure.in5
3 files changed, 29 insertions, 16 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index 4616da8..fcda7fd 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -12,6 +12,9 @@ What's New in Python 2.7 alpha 1
Core and Builtins
-----------------
+- Issue #7085: Fix crash when importing some extensions in a thread
+ on MacOSX 10.6.
+
- Issue #7117: Backport round implementation from Python 3.x. round
now uses David Gay's correctly-rounded string <-> double conversions
(when available), and so produces correctly rounded results. There
diff --git a/configure b/configure
index 367c879..4df297a 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
#! /bin/sh
-# From configure.in Revision: 76300 .
+# From configure.in Revision: 76308 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.61 for python 2.7.
#
@@ -3865,7 +3865,7 @@ else
{ echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6; }
fi
-rm -f conftest*
+rm -f -r conftest*
@@ -5413,7 +5413,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
else
ac_cv_header_stdc=no
fi
-rm -f conftest*
+rm -f -r conftest*
fi
@@ -5434,7 +5434,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
else
ac_cv_header_stdc=no
fi
-rm -f conftest*
+rm -f -r conftest*
fi
@@ -6532,7 +6532,7 @@ _ACEOF
fi
-rm -f conftest*
+rm -f -r conftest*
{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
echo "${ECHO_T}$was_it_defined" >&6; }
@@ -7062,7 +7062,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
else
ac_cv_type_uid_t=no
fi
-rm -f conftest*
+rm -f -r conftest*
fi
{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
@@ -15722,7 +15722,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
else
unistd_defines_pthreads=no
fi
-rm -f conftest*
+rm -f -r conftest*
{ echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
@@ -17336,7 +17336,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
$EGREP "yes" >/dev/null 2>&1; then
ipv6type=$i
fi
-rm -f conftest*
+rm -f -r conftest*
;;
kame)
@@ -17359,7 +17359,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ipv6libdir=/usr/local/v6/lib
ipv6trylibc=yes
fi
-rm -f conftest*
+rm -f -r conftest*
;;
linux-glibc)
@@ -17380,7 +17380,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ipv6type=$i;
ipv6trylibc=yes
fi
-rm -f conftest*
+rm -f -r conftest*
;;
linux-inet6)
@@ -17418,7 +17418,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ipv6lib=inet6;
ipv6libdir=/usr/local/v6/lib
fi
-rm -f conftest*
+rm -f -r conftest*
;;
v6d)
@@ -17441,7 +17441,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ipv6libdir=/usr/local/v6/lib;
BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
fi
-rm -f conftest*
+rm -f -r conftest*
;;
zeta)
@@ -17463,7 +17463,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
ipv6lib=inet6;
ipv6libdir=/usr/local/v6/lib
fi
-rm -f conftest*
+rm -f -r conftest*
;;
esac
@@ -25744,7 +25744,7 @@ cat >>confdefs.h <<\_ACEOF
_ACEOF
fi
-rm -f conftest*
+rm -f -r conftest*
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@@ -25763,7 +25763,7 @@ cat >>confdefs.h <<\_ACEOF
_ACEOF
fi
-rm -f conftest*
+rm -f -r conftest*
fi
@@ -26033,7 +26033,7 @@ cat >>confdefs.h <<\_ACEOF
_ACEOF
fi
-rm -f conftest*
+rm -f -r conftest*
fi
@@ -27111,6 +27111,11 @@ _ACEOF
fi
+if test $ac_sys_system = Darwin
+then
+ LIBS="$LIBS -framework CoreFoundation"
+fi
+
{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
diff --git a/configure.in b/configure.in
index fe8bb2b..c3a1678 100644
--- a/configure.in
+++ b/configure.in
@@ -3999,6 +3999,11 @@ then
[Define to printf format modifier for long long type])
fi
+if test $ac_sys_system = Darwin
+then
+ LIBS="$LIBS -framework CoreFoundation"
+fi
+
AC_CACHE_CHECK([for %zd printf() format support], ac_cv_have_size_t_format, [dnl
AC_TRY_RUN([