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++/17012] std::list's function, remove, looks like it is reading memory that has been freed.


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


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