gcc/libstdc++-v3/include/ext
Jeremy Sawicki 3ffa55de60 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
2018-08-14 12:23:50 +01:00
..
pb_ds Update copyright years. 2018-01-03 11:03:58 +01:00
algorithm Update copyright years. 2018-01-03 11:03:58 +01:00
aligned_buffer.h aligned_buffer.h [...] (template<> __aligned_buffer): Define as __aligned_membuf alias. 2018-02-20 20:51:44 +00:00
alloc_traits.h Update copyright years. 2018-01-03 11:03:58 +01:00
array_allocator.h Update copyright years. 2018-01-03 11:03:58 +01:00
atomicity.h Update copyright years. 2018-01-03 11:03:58 +01:00
bitmap_allocator.h Update copyright years. 2018-01-03 11:03:58 +01:00
cast.h Update copyright years. 2018-01-03 11:03:58 +01:00
cmath Update copyright years. 2018-01-03 11:03:58 +01:00
codecvt_specializations.h Update copyright years. 2018-01-03 11:03:58 +01:00
concurrence.h Update copyright years. 2018-01-03 11:03:58 +01:00
debug_allocator.h Update copyright years. 2018-01-03 11:03:58 +01:00
enc_filebuf.h Update copyright years. 2018-01-03 11:03:58 +01:00
extptr_allocator.h Update copyright years. 2018-01-03 11:03:58 +01:00
functional Update copyright years. 2018-01-03 11:03:58 +01:00
iterator Update copyright years. 2018-01-03 11:03:58 +01:00
malloc_allocator.h LWG 3035. std::allocator's constructors should be constexpr 2018-06-18 16:47:07 +01:00
memory 2018-06-05 François Dumont <fdumont@gcc.gnu.org> 2018-06-05 05:47:44 +00:00
mt_allocator.h Update copyright years. 2018-01-03 11:03:58 +01:00
new_allocator.h LWG 3035. std::allocator's constructors should be constexpr 2018-06-18 16:47:07 +01:00
numeric Update copyright years. 2018-01-03 11:03:58 +01:00
numeric_traits.h Update copyright years. 2018-01-03 11:03:58 +01:00
pod_char_traits.h Update copyright years. 2018-01-03 11:03:58 +01:00
pointer.h Replace safe bool idiom with explicit operator bool 2018-07-31 15:55:36 +01:00
pool_allocator.h Update copyright years. 2018-01-03 11:03:58 +01:00
random P0935R0 Eradicating unnecessarily explicit default constructors 2018-06-14 14:32:53 +01:00
random.tcc PR libstdc++/85749 constrain seed sequences for random number engines 2018-05-15 16:36:46 +01:00
rb_tree Update copyright years. 2018-01-03 11:03:58 +01:00
rc_string_base.h Update copyright years. 2018-01-03 11:03:58 +01:00
rope Rope iterators: don't retain pointers when copied 2018-08-14 12:23:50 +01:00
ropeimpl.h Update copyright years. 2018-01-03 11:03:58 +01:00
slist Update copyright years. 2018-01-03 11:03:58 +01:00
sso_string_base.h Update copyright years. 2018-01-03 11:03:58 +01:00
stdio_filebuf.h Update copyright years. 2018-01-03 11:03:58 +01:00
stdio_sync_filebuf.h Update copyright years. 2018-01-03 11:03:58 +01:00
string_conversions.h Update copyright years. 2018-01-03 11:03:58 +01:00
throw_allocator.h Add missing checks for _GLIBCXX_USE_C99_STDINT_TR1 2018-07-26 15:02:11 +01:00
type_traits.h Update copyright years. 2018-01-03 11:03:58 +01:00
typelist.h Update copyright years. 2018-01-03 11:03:58 +01:00
vstring_fwd.h Remove char16_t and char32_t dependency on <stdint.h> 2018-07-26 15:02:01 +01:00
vstring_util.h Update copyright years. 2018-01-03 11:03:58 +01:00
vstring.h Remove char16_t and char32_t dependency on <stdint.h> 2018-07-26 15:02:01 +01:00
vstring.tcc Update copyright years. 2018-01-03 11:03:58 +01:00