Hi,

I spent the night trying to track down a very bizarre memory corruption
issue and I've narrowed it down to this bit of code in
clutter/__init__.py:

        # fixes weird linker bugs on nvidia
        try:
            import dl
        #    sys.setdlopenflags(dl.RTLD_LAZY|dl.RTLD_GLOBAL)
        except ImportError:
            pass


We have a C module (kaa.display) which imports another C module
(kaa.imlib2).  This code segfaults python:

   import clutter
   import kaa.display

The C init function for kaa.display calls PyImport_ImportModule for
kaa.imlib2, which in turn initializes a type, which crashes in:

    if (PyType_Ready(&Image_PyObject_Type) < 0)
        return;

Image_PyObject_Type is getting corrupted.  I have distilled the code to
the simplest possible form and I can't seem to find any reason for it,
nor avoid it.

There is no problem unless you import clutter first (that is, importing
kaa.display first and clutter second actually works).  Commenting out
the call to setdlopenflags() stops the corruption and, as a result, the
segfault.

I suppose modifying the dlopen flags is affecting importing C modules in
some very insidious way.

Thanks,
Jason.

-- 
To unsubscribe send a mail to [EMAIL PROTECTED]

Reply via email to