[Bug c++/57111] Core dump - invalid pointer detected after std::unique_ptr

2013-04-30 Thread jb.1234abcd at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57111 jb changed: What|Removed |Added Status|RESOLVED|VERIFIED --- Comment #8 from jb 2013-04-3

[Bug c++/57111] Core dump - invalid pointer detected after std::unique_ptr

2013-04-30 Thread jb.1234abcd at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57111 --- Comment #7 from jb 2013-04-30 22:22:44 UTC --- (In reply to comment #6) > (In reply to comment #5) > > It seems to me that the option "free-nonheap-object" does not work in gcc. > > You need to add -O2 (maybe -O1 is enough, sometimes you ne

[Bug c++/57111] Core dump - invalid pointer detected after std::unique_ptr

2013-04-30 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57111 --- Comment #6 from Marc Glisse 2013-04-30 22:07:02 UTC --- (In reply to comment #5) > It seems to me that the option "free-nonheap-object" does not work in gcc. You need to add -O2 (maybe -O1 is enough, sometimes you need -O3), otherwis

[Bug c++/57111] Core dump - invalid pointer detected after std::unique_ptr

2013-04-30 Thread jb.1234abcd at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57111 --- Comment #5 from jb 2013-04-30 21:57:00 UTC --- (In reply to comment #4) > gcc has -Wfree-nonheap-object, which works for free but not for delete or > delete[]. Extending it to these functions seems like a reasonable RFE. I agree wit

[Bug c++/57111] Core dump - invalid pointer detected after std::unique_ptr

2013-04-30 Thread glisse at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57111 --- Comment #4 from Marc Glisse 2013-04-30 18:37:41 UTC --- gcc has -Wfree-nonheap-object, which works for free but not for delete or delete[]. Extending it to these functions seems like a reasonable RFE.

[Bug c++/57111] Core dump - invalid pointer detected after std::unique_ptr

2013-04-29 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57111 --- Comment #3 from Jonathan Wakely 2013-04-29 14:09:46 UTC --- (In reply to comment #2) > (In reply to comment #1) > > That's not how you use unique_ptr. > > That's besides the point when you get a dump. No, it's entirely the point,

[Bug c++/57111] Core dump - invalid pointer detected after std::unique_ptr

2013-04-29 Thread jb.1234abcd at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57111 --- Comment #2 from jb 2013-04-29 14:04:38 UTC --- (In reply to comment #1) > That's not how you use unique_ptr. That's besides the point when you get a dump. If the proper use of unique_ptr with array is: unique_ptr up(new int[4]); //

[Bug c++/57111] Core dump - invalid pointer detected after std::unique_ptr

2013-04-29 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57111 Jonathan Wakely changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|