This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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] |
Speaking relative to 4.2.0 is fine, as far as I can tell, this bug existsExactly, personally I saw that pattern so many times...
in all versions of gnu deque as far back as I can see. In fact I see the
same problem in the SGI implementation. It seems to be an old bug and must
have been copied MANY times into MANY implementations.
I see, in such cases we don't have a problem with 23.2.1.3/4, still we have one with /5.These seem to be the main issues: the one extra copy and at the same time copying in the wrong direction, thus invalidating the iterators. I can't see any other problems.
Although it is a problem more often than when n = size() - 1
ie. size() = 8 erase(begin() + 3, begin() + 4)
I believe your fix is just as valid as mine. Either one seems to fix the problem.Excellent, I will soon commit a fix together with your 2nd testcase, which is very small (we have to pay attention to your Copyleft rules...) and fully deterministic, should be enough.
Thanks again, Paolo.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |