[python-pycurl] - Add patch developed by David Malcolm to fix segfaults caused by a missing incref
Jeffrey C. Ollie
jcollie at fedoraproject.org
Tue Aug 17 18:51:03 UTC 2010
commit ac3344cfb1bfd0a8d7ccb8e455b190410c3c11f4
Author: Jeffrey C. Ollie <jeff at ocjtech.us>
Date: Tue Aug 17 13:50:47 2010 -0500
- Add patch developed by David Malcolm to fix segfaults caused by a missing incref
python-pycurl-fix-do_curl_reset-refcount.patch | 24 ++++++++++++++++++++++++
python-pycurl.spec | 8 ++++++--
2 files changed, 30 insertions(+), 2 deletions(-)
---
diff --git a/python-pycurl-fix-do_curl_reset-refcount.patch b/python-pycurl-fix-do_curl_reset-refcount.patch
new file mode 100644
index 0000000..7e20b15
--- /dev/null
+++ b/python-pycurl-fix-do_curl_reset-refcount.patch
@@ -0,0 +1,24 @@
+--- a/src/pycurl.c
++++ a/src/pycurl.c
+@@ -1452,6 +1452,7 @@ do_curl_reset(CurlObject *self)
+ }
+ }
+
++ Py_INCREF(Py_None);
+ return Py_None;
+ }
+
+--- a/tests/test_internals.py
++++ a/tests/test_internals.py
+@@ -245,6 +245,11 @@ if 1 and gc:
+ if opts.verbose >= 1:
+ print "Tracked objects:", len(gc.get_objects())
+
++if 1:
++ # Ensure that the refcounting error in "reset" is fixed:
++ for i in xrange(100000):
++ c = Curl()
++ c.reset()
+
+ # /***********************************************************************
+ # // done
diff --git a/python-pycurl.spec b/python-pycurl.spec
index 460c72e..a081444 100644
--- a/python-pycurl.spec
+++ b/python-pycurl.spec
@@ -2,7 +2,7 @@
Name: python-pycurl
Version: 7.19.0
-Release: 6%{?dist}
+Release: 7%{?dist}
Summary: A Python interface to libcurl
Group: Development/Languages
@@ -10,7 +10,7 @@ License: LGPLv2+ or MIT
URL: http://pycurl.sourceforge.net/
Source0: http://pycurl.sourceforge.net/download/pycurl-%{version}.tar.gz
Patch0: python-pycurl-no-static-libs.patch
-
+Patch1: python-pycurl-fix-do_curl_reset-refcount.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: python-devel
@@ -38,6 +38,7 @@ of features.
%prep
%setup0 -q -n pycurl-%{version}
%patch0 -p0
+%patch1 -p1
chmod a-x examples/*
%build
@@ -61,6 +62,9 @@ rm -rf %{buildroot}
%{python_sitearch}/*
%changelog
+* Tue Aug 17 2010 Jeffrey C. Ollie <jeff at ocjtech.us> - 7.19.0-7
+- Add patch developed by David Malcolm to fix segfaults caused by a missing incref
+
* Thu Jul 22 2010 David Malcolm <dmalcolm at redhat.com> - 7.19.0-6
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
More information about the scm-commits
mailing list