[Python-checkins] commit of r41413 - in python/branches/release24-maint: Misc Python
neal.norwitz@python.org
neal.norwitz at python.org
Wed Nov 9 08:02:41 CET 2005
Author: neal.norwitz
Date: Wed Nov 9 08:02:40 2005
New Revision: 41413
Modified:
python/branches/release24-maint/Misc/NEWS
python/branches/release24-maint/Python/dynload_shlib.c
Log:
Backport:
SF Bug #1350188, "setdlopenflags" leads to crash upon "import"
It was possible dlerror() returns a NULL pointer, use a default error
message in this case.
Modified: python/branches/release24-maint/Misc/NEWS
==============================================================================
--- python/branches/release24-maint/Misc/NEWS (original)
+++ python/branches/release24-maint/Misc/NEWS Wed Nov 9 08:02:40 2005
@@ -12,6 +12,10 @@
Core and builtins
-----------------
+- SF Bug #1350188, "setdlopenflags" leads to crash upon "import"
+ It was possible dlerror() returns a NULL pointer, use a default error
+ message in this case.
+
- SF bug #1167751: fix incorrect code being for generator expressions.
The following code now raises a SyntaxError: foo(a = i for i in range(10))
Modified: python/branches/release24-maint/Python/dynload_shlib.c
==============================================================================
--- python/branches/release24-maint/Python/dynload_shlib.c (original)
+++ python/branches/release24-maint/Python/dynload_shlib.c Wed Nov 9 08:02:40 2005
@@ -130,7 +130,10 @@
handle = dlopen(pathname, dlopenflags);
if (handle == NULL) {
- PyErr_SetString(PyExc_ImportError, dlerror());
+ char *error = dlerror();
+ if (error == NULL)
+ error = "unknown dlopen() error";
+ PyErr_SetString(PyExc_ImportError, error);
return NULL;
}
if (fp != NULL && nhandles < 128)
More information about the Python-checkins
mailing list