Random crash with GCC 4.7.1

Jonathan Wakely jwakely.gcc@gmail.com
Mon Jul 9 17:50:00 GMT 2012

On 9 July 2012 16:06, wbrana <wbrana@gmail.com> wrote:
> Hello,
> My C++ application which uses Qt and libsigc++ libraries is stable if
> all 3 components are compiled with GCC 4.4.7
> If my app is compiled with GCC 4.7.1 it crashes in random time
> (approx. 1 hour from start) and
> place as detected by GDB.
> I tried to run app with Valgrind, but didn't have crash yet.
> Output from Valgrind (following errors are not present if my app is
> compiled with GCC 4.4.7):
> ==8242== 110634 errors in context 51 of 52:
> ==8242== Invalid read of size 8
> ==8242==    at 0x126B63:
> sigc::internal::temp_slot_list::~temp_slot_list() (stl_list.h:358)

Are you compiling some of your application with -std=c++11 or
-std=c++0x and linking to other code compiled without those flags?

For GCC 4.7.0 and 4.7.1 there is an incompatibility between c++11 and
c++98 code due to the size of std::list being different in C++11 mode.

More information about the Gcc-help mailing list