Re: [Boost-users] [python], [regex] Segmentation fault when deallocating match_results in a python extension module

Arrr, I've now compiled the example on different machines (Windows, MacOS)
and it seems I'm only getting into troubles on my target system
(Debian)...
I've used ldd to get the library dependencies of my extension modules; the
difference between building with gcc3.3 and gcc3.4 is with the libstdc++,
which is used in version 5 and 6, respectively. But since python doesn't
use this library, this should make no difference at all.
Is there anything else I could possibly try?
Thanks
Bernhard
"John Maddock"
Hello everybody The program aborts when exiting test_func(), during deallocation of match_results. The error occurs somewhere in _M_deallocate of stl_vector.h.
Can anybody help me with this problem? What could possibly go wrong here?
In theory not much :-(
One thing I noted: python is compiled using GCC3.3 on our system, while we are using GCC3.4, is this a problem? (But, trying the same on a system with GCC 4 for both, python and our app, also fails, so it seems like the problem is to be sought elsewhere).
It does sound like the std::vector is allocating with one one allocator and deallocating with another. But I know nothing about python extension modules and what can go wrong there. John. _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users

bernhard.maeder@zkb.ch wrote:
Arrr, I've now compiled the example on different machines (Windows, MacOS) and it seems I'm only getting into troubles on my target system (Debian)...
I've used ldd to get the library dependencies of my extension modules; the difference between building with gcc3.3 and gcc3.4 is with the libstdc++, which is used in version 5 and 6, respectively. But since python doesn't use this library, this should make no difference at all.
Is there anything else I could possibly try?
I have to admit I'm stumped, but like I said I'm not a python expert. I did a quick Google search and discovered that this has been seen before when using Boost.Python to wrap std::vector, *but only when using blender* see http://www.blender3d.com/forum/viewtopic.php?p=41828&highlight=&sid=c7039b55ca7fcb0c37584818cbb5cf66 does this ring any bells? Otherwise the only thing I can think of is maybe some kind of problem with modules getting unloaded in the wrong order, or maybe globals declared in your module getting destroyed after the std lib has been taken down. But that *shouldn't* happen either. John.
participants (2)
-
bernhard.maeder@zkb.ch
-
John Maddock