aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJeremy Sawicki <jeremy-gcc@sawicki.us>2018-08-14 11:23:50 +0000
committerJonathan Wakely <redi@gcc.gnu.org>2018-08-14 12:23:50 +0100
commit3ffa55de6061011361d13d0ecb032c694556ebf7 (patch)
tree0f678d4fe0e0a22224cb8f95e68293d013ac9d73 /gcc
parent5d3083dde2a4fb03fab20d66fda1a5881801c757 (diff)
downloadgcc-3ffa55de6061011361d13d0ecb032c694556ebf7.zip
gcc-3ffa55de6061011361d13d0ecb032c694556ebf7.tar.gz
gcc-3ffa55de6061011361d13d0ecb032c694556ebf7.tar.bz2
Rope iterators: don't retain pointers when copied
Rope iterators sometimes contain pointers to an internal buffer inside the iterator itself. When such an iterator is copied, the copy incorrectly retains pointers to the original. This patch takes the simple approach of not copying the cached information when the internal buffer is being used, instead requiring it to be recomputed when the copied iterator is dereferenced. An alternative would be to adjust the pointers so they refer to the buffer in the copy. 2018-08-14 Jeremy Sawicki <jeremy-gcc@sawicki.us> * include/ext/rope (_Rope_iterator_base(const _Rope_iterator_base&)) (_Rope_const_iterator::operator=(const _Rope_const_iterator&)) (_Rope_iterator::operator=(const _Rope_iterator&)): Ensure copied/assigned rope iterators don't retain pointers to the iterator they were copied/assigned from. * testsuite/ext/rope/7.cc: New. From-SVN: r263534
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions