GNOME Bugzilla – Bug 302031
sigc::ref() crash with g++ 3.3
Last modified: 2005-04-27 06:39:43 UTC
Version details: g++ 3.3 When using the latest (cvs) libsigc++, in which visit_each_type() specifies the exact template specialization of visit_each<> to use, this test case causes a crash. It seems that the bound parameter is not properly forgotten when it is destroyed. This does not crash with g++ 3.4.
Created attachment 45688 [details] test_bind_ref.cc
Interestingly, though it does not crash with g++ 3.4, it does seem to still incorrectly access the data in the destroyed parameter. By the way, the change was made in libsigc++ to solve this bug: http://bugzilla.gnome.org/show_bug.cgi?id=169225
I have reverted the change, so sigc::ref() works again. It does not really fix the other problem - it just avoids it and leaks instead.