This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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;
          }
       }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]