This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/41448] std::sort on std::vector<float> with certain values leads to segfault in the vector destructor
- From: "4ernov at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Sep 2009 18:39:24 -0000
- Subject: [Bug libstdc++/41448] std::sort on std::vector<float> with certain values leads to segfault in the vector destructor
- References: <bug-41448-18221@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from 4ernov at gmail dot com 2009-09-24 18:39 -------
Is there anything in C++ Standard concerning this case?
Maybe it's more preferrable to throw exception or something like this.. Now it
seems to make memory leak in the operated vector.
The output is like this:
*** glibc detected *** /usr/local/share/workspace/playground/gcc_sort:
munmap_chunk(): invalid pointer: 0x0000000001d2c550 ***
*** glibc detected *** /usr/local/share/workspace/playground/gcc_sort:
malloc(): memory corruption: 0x0000000001d2bca0 ***
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41448