[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#468996: python-oss: may use different memory API for a given memory block

Package: python-oss
Severity: important
User: debian-release@lists.debian.org
Usertags: goal-python2.5

The C API requires using the same memory API for a given memory block,
which will show up as a segfault, at least in python2.5. This code was
found by a search of all sources build-depending on python-dev, having
a PyObject_ function for allocation and a PyMem_ function for
deallocation in the same file.  This may be a real problem, or a false

The most common error seen is of the form:

  PyObject *
  new_wadobject(WadFrame *f, int count) {
    wadobject   *self;
    self = PyObject_NEW(wadobject, &WadObjectType);

  static void
  wadobject_dealloc(wadobject *self) {

This particular example can be fixed with replacing PyMem_DEL with

For more information, see

Please set the severity of this report to "serious", if it is a real
problem, please close the report if it is a false positive.  Ask
the debian-python@lists.debian.org ML for help. Archive of the
search results: http://ftp-master.debian.org/~he/affected-files.tar.gz

Reply to: