[Bug c++/53455] boost::python segfault

s_gccbugzilla at nedprod dot com gcc-bugzilla@gcc.gnu.org
Thu Jun 14 13:25:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53455

--- Comment #15 from Niall Douglas <s_gccbugzilla at nedprod dot com> 2012-06-14 13:24:58 UTC ---
Agreed, but it is highly unlikely to happen anytime soon unless a new sponsor
turns up. BPL needs a fair bit of post-bitrot work as it is.

Niall

(In reply to comment #12)
> Maybe someone should look at fixing these warnings in Boost.Python, or ensure
> -fno-strict-aliasing is used
> 
>     "g++"  -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -m64
> -pthread -fPIC  -DBOOST_ALL_NO_LIB=1 -DBOOST_PYTHON_SOURCE -DNDEBUG  -I"."
> -I"/apps/infra/3rd-party/gcc-4.4-64/python-2.6.5/include/python2.6" -c -o
> "bin.v2/libs/python/build/gcc-4.7.0/release/threading-multi/object/enum.o"
> "libs/python/src/object/enum.cpp"
> 
> libs/python/src/object/enum.cpp: In function 'boost::python::api::object
> boost::python::objects::{anonymous}::new_enum_type(const char*, const char*)':
> libs/python/src/object/enum.cpp:150:11: warning: dereferencing type-punned
> pointer will break strict-aliasing rules [-Wstrict-aliasing]
> 
>     "g++"  -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -m64
> -pthread -fPIC  -DBOOST_ALL_NO_LIB=1 -DBOOST_PYTHON_SOURCE -DNDEBUG  -I"."
> -I"/apps/infra/3rd-party/gcc-4.4-64/python-2.6.5/include/python2.6" -c -o
> "bin.v2/libs/python/build/gcc-4.7.0/release/threading-multi/object/class.o"
> "libs/python/src/object/class.cpp"
> 
> libs/python/src/object/class.cpp: In function 'PyObject*
> boost::python::objects::static_data()':
> libs/python/src/object/class.cpp:211:11: warning: dereferencing type-punned
> pointer will break strict-aliasing rules [-Wstrict-aliasing]
> libs/python/src/object/class.cpp: In function 'boost::python::type_handle
> boost::python::objects::class_metatype()':
> libs/python/src/object/class.cpp:319:11: warning: dereferencing type-punned
> pointer will break strict-aliasing rules [-Wstrict-aliasing]
> libs/python/src/object/class.cpp: In function 'boost::python::type_handle
> boost::python::objects::class_type()':
> libs/python/src/object/class.cpp:473:11: warning: dereferencing type-punned
> pointer will break strict-aliasing rules [-Wstrict-aliasing]
> gcc.compile.c++
> bin.v2/libs/python/build/gcc-4.7.0/release/threading-multi/object/life_support.o
> 
>     "g++"  -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -m64
> -pthread -fPIC  -DBOOST_ALL_NO_LIB=1 -DBOOST_PYTHON_SOURCE -DNDEBUG  -I"."
> -I"/apps/infra/3rd-party/gcc-4.4-64/python-2.6.5/include/python2.6" -c -o
> "bin.v2/libs/python/build/gcc-4.7.0/release/threading-multi/object/life_support.o"
> "libs/python/src/object/life_support.cpp"
> 
> libs/python/src/object/life_support.cpp: In function 'PyObject*
> boost::python::objects::make_nurse_and_patient(PyObject*, PyObject*)':
> libs/python/src/object/life_support.cpp:94:9: warning: dereferencing
> type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
> libs/python/src/object/life_support.cpp:96:9: warning: dereferencing
> type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
> gcc.compile.c++
> bin.v2/libs/python/build/gcc-4.7.0/release/threading-multi/object/function.o
> 
>     "g++"  -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -m64
> -pthread -fPIC  -DBOOST_ALL_NO_LIB=1 -DBOOST_PYTHON_SOURCE -DNDEBUG  -I"."
> -I"/apps/infra/3rd-party/gcc-4.4-64/python-2.6.5/include/python2.6" -c -o
> "bin.v2/libs/python/build/gcc-4.7.0/release/threading-multi/object/function.o"
> "libs/python/src/object/function.cpp"
> 
> libs/python/src/object/function.cpp: In constructor
> 'boost::python::objects::function::function(const
> boost::python::objects::py_function&, const boost::python::detail::keyword*,
> unsigned int)':
> libs/python/src/object/function.cpp:108:9: warning: dereferencing type-punned
> pointer will break strict-aliasing rules [-Wstrict-aliasing]
> libs/python/src/object/function.cpp:110:9: warning: dereferencing type-punned
> pointer will break strict-aliasing rules [-Wstrict-aliasing]



More information about the Gcc-bugs mailing list