Make printers detect invalid debug mode iterators
authorJonathan Wakely <jwakely@redhat.com>
Wed, 14 Dec 2016 15:17:57 +0000 (15:17 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Wed, 14 Dec 2016 15:17:57 +0000 (15:17 +0000)
commit3c760f4a79c221408122b3f265a8039b04ce697e
tree20800d1ea3a325b165b20be26c3762f54fabd9ee
parent54601417cebb474d8b941ccf4e0502624500a11c
Make printers detect invalid debug mode iterators

PR libstdc++/59170
* python/libstdcxx/v6/printers.py (StdDebugIteratorPrinter): Use
_M_sequence and _M_version to detect invalid iterators.
* testsuite/libstdc++-prettyprinters/debug.cc: Test debug mode vector
and test invalid iterators.
* testsuite/libstdc++-prettyprinters/debug_cxx11.cc: New test.

From-SVN: r243650
libstdc++-v3/ChangeLog
libstdc++-v3/python/libstdcxx/v6/printers.py
libstdc++-v3/testsuite/libstdc++-prettyprinters/debug.cc
libstdc++-v3/testsuite/libstdc++-prettyprinters/debug_cxx11.cc [new file with mode: 0644]