Boost.Python and _GLIBCXX_DEBUG
Using boost 1.40 and gcc 4.3.4 (same problem occurs with gcc 4.4.2) I
have the following problem.
After compiling the attached python module with the command
g++ -shared -fPIC -o kernel.so python.cc box.cc -lboost_python -I/usr/include/python2.5
and executing
python run.py
I get the error message
*** glibc detected *** python: free(): invalid next size (fast): 0x0000000001a32a30 ***
This error does not occur when the macro _GLIBCXX_DEBUG is not being
defined. It also does not occur when the contents of python.cc and
box.cc are put into one file.
In more complicated programs defining _GLIBCXX_DEBUG can lead to a
"Segmentation fault". Not defining _GLIBCXX_DEBUG also helps there.
Is there a way to deal with this short of not defining _GLIBCXX_DEBUG?
Could it be a bug in Boost.Python?
Thanks in advance,
Christoph
here are the files:
file python.cc:
****************************************************************
#include
AMDG Christoph Groth wrote:
Using boost 1.40 and gcc 4.3.4 (same problem occurs with gcc 4.4.2) I have the following problem.
After compiling the attached python module with the command
g++ -shared -fPIC -o kernel.so python.cc box.cc -lboost_python -I/usr/include/python2.5
and executing
python run.py
I get the error message
*** glibc detected *** python: free(): invalid next size (fast): 0x0000000001a32a30 ***
This error does not occur when the macro _GLIBCXX_DEBUG is not being defined. It also does not occur when the contents of python.cc and box.cc are put into one file.
In more complicated programs defining _GLIBCXX_DEBUG can lead to a "Segmentation fault". Not defining _GLIBCXX_DEBUG also helps there.
Is there a way to deal with this short of not defining _GLIBCXX_DEBUG? Could it be a bug in Boost.Python?
You have to define _GLIBCXX_DEBUG when compiling the Boost.Python library. In Christ, Steven Watanabe
participants (2)
-
Christoph Groth
-
Steven Watanabe