Rev 3873: Call PyErr_NoMemory() before returning NULL in in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Sat Nov 29 02:37:51 GMT 2008


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 3873
revision-id: pqm at pqm.ubuntu.com-20081129023747-31a9su43tijw8p3r
parent: pqm at pqm.ubuntu.com-20081128071639-usprv2emoq2mgxnw
parent: andrew.bennetts at canonical.com-20081129020121-tazph6xr6jgwy0lp
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Sat 2008-11-29 02:37:47 +0000
message:
  Call PyErr_NoMemory() before returning NULL in
  	PatienceSequenceMatcher_new.
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzrlib/_patiencediff_c.c       _patiencediff_c.c-20070721205602-q3imkipwlgagp3cy-1
    ------------------------------------------------------------
    revno: 3872.1.2
    revision-id: andrew.bennetts at canonical.com-20081129020121-tazph6xr6jgwy0lp
    parent: andrew.bennetts at canonical.com-20081129003113-7i4ib0spwj53o1l5
    committer: Andrew Bennetts <andrew.bennetts at canonical.com>
    branch nick: patiencediff_c-fix
    timestamp: Sat 2008-11-29 13:01:21 +1100
    message:
      Add NEWS entry.
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
    ------------------------------------------------------------
    revno: 3872.1.1
    revision-id: andrew.bennetts at canonical.com-20081129003113-7i4ib0spwj53o1l5
    parent: pqm at pqm.ubuntu.com-20081128071639-usprv2emoq2mgxnw
    committer: Andrew Bennetts <andrew.bennetts at canonical.com>
    branch nick: patiencediff_c-fix
    timestamp: Sat 2008-11-29 11:31:13 +1100
    message:
      Call PyErr_NoMemory() before returning NULL in PatienceSequenceMatcher_new.
    modified:
      bzrlib/_patiencediff_c.c       _patiencediff_c.c-20070721205602-q3imkipwlgagp3cy-1
=== modified file 'NEWS'
--- a/NEWS	2008-11-28 06:31:17 +0000
+++ b/NEWS	2008-11-29 02:01:21 +0000
@@ -16,6 +16,10 @@
 
   BUG FIXES:
 
+    * Fix SystemError in ``_patiencediff_c`` module by calling
+      PyErr_NoMemory() before returning NULL in PatienceSequenceMatcher_new.
+      (Andrew Bennetts, #303206)
+
   DOCUMENTATION:
 
   API CHANGES:

=== modified file 'bzrlib/_patiencediff_c.c'
--- a/bzrlib/_patiencediff_c.c	2008-09-25 22:08:41 +0000
+++ b/bzrlib/_patiencediff_c.c	2008-11-29 00:31:13 +0000
@@ -768,6 +768,7 @@
         self->backpointers = (Py_ssize_t *)malloc(sizeof(Py_ssize_t) * self->bsize * 4);
         if (self->backpointers == NULL) {
             Py_DECREF(self);
+            PyErr_NoMemory();
             return NULL;
         }
 




More information about the bazaar-commits mailing list