id summary reporter owner description type status milestone component version severity resolution keywords cc 6895 Segfault when using derived classed and compiling with GCC 4.7.0 Maciej Dems Ralf W. Grosse-Kunstleve "In a typical situation of exporting derived virtual class to Python and calling overridden virtual function Boost Python yields segfault if the following conditions are met: * the code is compiled with GCC 4.7.0 (for 4.6.x everything is fine) * C++0x standard is turned on (-std=c++0x is set) * one declares Boost shared_ptr to store objects in Python wrapper i.e.: class_< A, shared_ptr > In the attachment I include the problematic file. To reproduce the error it has to be compiled as (Python version does not matter): g++-4.7 -g -std=c++0x -fPIC -shared -lboost_python-py26 -lpython2.6 -I/usr/include/python2.6 -o boosterror.so boosterror.cpp In Python the following code causes segfault: import boosterror b = boosterror.B() b.f() # segfault here I don't know whether it is a Boost or a GCC bug. However, in the latter case, the direct cause of the problem should be identified to submit bug to GCC and the workaround for GCC 4.7.0 must be implemented in Boost." Bugs closed To Be Determined python USE GITHUB Boost 1.49.0 Showstopper invalid