How to test/troubshoot an extension (pylibconfig)?
Grant Edwards
invalid at invalid.invalid
Thu Jul 8 11:00:29 EDT 2010
On 2010-07-07, Grant Edwards <invalid at invalid.invalid> wrote:
> Oops. Those Python bindings are for version 1.3.2 of libconfig (which
> does work). They don't work with the current version of libconfig.
I've stripped the python bindings down to a minimal point, and I've
decided there may be a memory corruption problem in the 1.4.5 version
of the library. Here's the current boost binding:
---------------------------------pylibconfig.cc------------------------------
#include <boost/python.hpp>
#include <libconfig.h++>
using namespace boost::python;
using namespace libconfig;
class pyConfig
{
public:
pyConfig()
{
config = new Config();
}
~pyConfig ()
{
delete config;
}
private:
Config *config;
};
BOOST_PYTHON_MODULE(pylibconfig)
{
class_<pyConfig>("Config");
}
---------------------------------pylibconfig.cc------------------------------
That builds without warnings and installs fine, but attempting to
actually create an instance of the class in Python causes a glibc
memory corruption message:
Python 2.6.5 (release26-maint, Jun 22 2010, 12:58:11)
[GCC 4.3.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pylibconfig
>>> conf = pylibconfig.Config()
*** glibc detected *** /usr/bin/python2.6: corrupted double-linked list: 0x08065c48 ***
Am I correct in concluding it has to be a memory corruption problem in
the library itself?
--
Grant Edwards grant.b.edwards Yow! I want the presidency
at so bad I can already taste
gmail.com the hors d'oeuvres.
More information about the Python-list
mailing list