[Bug libstdc++/55320] Invalid delete with throwing copy-c'tor passed to std::function

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Nov 14 12:12:00 GMT 2012


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

--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-11-14 12:12:19 UTC ---
Untested:

--- functional.orig     2012-11-14 12:11:32.442993035 +0000
+++ functional  2012-11-14 12:11:34.315184425 +0000
@@ -2318,8 +2318,8 @@
        if (_My_handler::_M_not_empty_function(__f))
          {
            _M_invoker = &_My_handler::_M_invoke;
-           _M_manager = &_My_handler::_M_manager;
            _My_handler::_M_init_functor(_M_functor, std::move(__f));
+           _M_manager = &_My_handler::_M_manager;
          }
       }



More information about the Gcc-bugs mailing list