public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/60750] New: double free after std::move on string inside throw when compiled with optimization
@ 2014-04-03 15:51 sshannin at gmail dot com
  2014-04-03 18:12 ` [Bug c++/60750] " redi at gcc dot gnu.org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: sshannin at gmail dot com @ 2014-04-03 15:51 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 60750
           Summary: double free after std::move on string inside throw
                    when compiled with optimization
           Product: gcc
           Version: 4.8.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sshannin at gmail dot com
              Host: Linux hostname 3.2.0-29-generic #46-Ubuntu SMP Fri Jul
                    27 17:03:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
            Target: x86_64-unknown-linux-gnu
             Build: ../gcc-4.8.2/configure --disable-multilib
                    --enable-languages=c++ --program-suffix=-4.8.2

Created attachment 32535
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32535&action=edit
Source

If I compile the attached source without optimization and run it (g++-4.8.2
--std=c++11 -o sample sample.cpp; ./sample), it behaves as expected.

If I compile with even O1 (g++-4.8.2 --std=c++11 -O1 -o sample sample.cpp), I
get the glibc double free warning dump.

I considered this source small enough (with standard headers) to not require
the preprocessed to be attached. Let me know if that, or any other info, is
desired as well


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2014-05-05 13:50 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-03 15:51 [Bug c++/60750] New: double free after std::move on string inside throw when compiled with optimization sshannin at gmail dot com
2014-04-03 18:12 ` [Bug c++/60750] " redi at gcc dot gnu.org
2014-04-03 18:19 ` trippels at gcc dot gnu.org
2014-04-03 19:41 ` sshannin at gmail dot com
2014-04-04  9:43 ` [Bug c++/60750] [4.8/4.9 Regression] " rguenth at gcc dot gnu.org
2014-04-04 11:00 ` trippels at gcc dot gnu.org
2014-04-04 11:22 ` rguenth at gcc dot gnu.org
2014-04-04 11:37 ` rguenth at gcc dot gnu.org
2014-04-04 12:14 ` rguenth at gcc dot gnu.org
2014-04-07  8:39 ` rguenth at gcc dot gnu.org
2014-04-07  8:39 ` [Bug c++/60750] [4.8 " rguenth at gcc dot gnu.org
2014-05-05 13:49 ` rguenth at gcc dot gnu.org
2014-05-05 13:50 ` rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).