[Bug libstdc++/17012] std::list's function, remove, looks like it is reading memory that has been freed.
caj at cs dot york dot ac dot uk
gcc-bugzilla@gcc.gnu.org
Sun Sep 5 11:41:00 GMT 2004
------- Additional Comments From caj at cs dot york dot ac dot uk 2004-09-05 11:40 -------
This problem seems to go deeper than just list::remove.
As an example, given
A[]={0,1,0,1,0,1,0,1};
then
std::remove(A,A+8,1) and std::remove(A,A+8,*(A+1)) produce different output, as
the second one will start removing different elements once the value of A[1] is
changed while the algorithm is running.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17012
More information about the Gcc-bugs
mailing list