GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • [Python-Dev] [PEP-212] new draft
  • [Python-Dev] Death to string functions!
  • [ date ]
  • [ thread ]
  • [ subject ]
  • [ author ]

This view

  • Original page
  • New address

GeezerVison is showing mail.python.org — [Python-Dev] memory leaks

[Python-Dev] memory leaks

Charles G Waldman [email protected]
Thu, 14 Dec 2000 15:06:43 -0600 (CST)

  • Previous message: [Python-Dev] [PEP-212] new draft
  • Next message: [Python-Dev] Death to string functions!
  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

The following code (extracted from test_extcall.py) leaks memory:

class Foo:
   def method(self, arg1, arg2):
        return arg1 + arg2

def f():
    err = None
    try:
        Foo.method(*(1, 2, 3))
    except TypeError, err:
        pass
    del err



One-line fix (also posted to Sourceforge):

--- Python/ceval.c	2000/10/30 17:15:19	2.213
+++ Python/ceval.c	2000/12/14 20:54:02
@@ -1905,8 +1905,7 @@
 							 class))) {
 				    PyErr_SetString(PyExc_TypeError,
 	    "unbound method must be called with instance as first argument");
-				    x = NULL;
-				    break;
+				    goto extcall_fail;
 				}
 			    }
 			}



I think that there are a bunch more memory leaks lurking around...
this only fixes one of them.  I'll send more info as I find out what's
going on.




  • Previous message: [Python-Dev] [PEP-212] new draft
  • Next message: [Python-Dev] Death to string functions!
  • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.