[Bug libstdc++/59170] pretty printers: end iterator invalid pointer

2017-05-18 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59170 Jonathan Wakely changed: What|Removed |Added Status|RESOLVED|NEW Resolution|FIXED

[Bug libstdc++/59170] pretty printers: end iterator invalid pointer

2017-05-18 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59170 Jonathan Wakely changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug libstdc++/59170] pretty printers: end iterator invalid pointer

2017-05-18 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59170 --- Comment #19 from Jonathan Wakely --- Author: redi Date: Thu May 18 09:23:43 2017 New Revision: 248183 URL: https://gcc.gnu.org/viewcvs?rev=248183=gcc=rev Log: PR59170 make pretty printers check for singular iterators Backport from mainline

[Bug libstdc++/59170] pretty printers: end iterator invalid pointer

2017-02-15 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59170 --- Comment #18 from Jonathan Wakely --- Author: redi Date: Wed Feb 15 13:38:48 2017 New Revision: 245481 URL: https://gcc.gnu.org/viewcvs?rev=245481=gcc=rev Log: PR59170 make pretty printers check for singular iterators Backport from mainline

[Bug libstdc++/59170] pretty printers: end iterator invalid pointer

2016-12-15 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59170 --- Comment #17 from Jonathan Wakely --- I've added some more checks for non-debug iterators. The only thing remaining is to add checks for debug iterators to detect when they are past-the-end.

[Bug libstdc++/59170] pretty printers: end iterator invalid pointer

2016-12-15 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59170 --- Comment #16 from Jonathan Wakely --- Author: redi Date: Thu Dec 15 14:13:36 2016 New Revision: 243692 URL: https://gcc.gnu.org/viewcvs?rev=243692=gcc=rev Log: PR59170 make pretty printers check for singular iterators PR

[Bug libstdc++/59170] pretty printers: end iterator invalid pointer

2016-12-14 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59170 --- Comment #15 from Jonathan Wakely --- Author: redi Date: Wed Dec 14 15:17:57 2016 New Revision: 243650 URL: https://gcc.gnu.org/viewcvs?rev=243650=gcc=rev Log: Make printers detect invalid debug mode iterators PR libstdc++/59170

[Bug libstdc++/59170] pretty printers: end iterator invalid pointer

2016-12-14 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59170 --- Comment #14 from Jonathan Wakely --- (In reply to Jonathan Wakely from comment #7) > "print it" should not automatically dereference. The Python code that registers the printers for iterators even says: # These shouldn't be

[Bug libstdc++/59170] pretty printers: end iterator invalid pointer

2016-12-14 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59170 --- Comment #13 from Jonathan Wakely --- (In reply to Jan Kratochvil from comment #11) > (In reply to Jonathan Wakely from comment #9) > > Most developers don't even know the debug mode exists. > > That's a problem communicating it to users.

[Bug libstdc++/59170] pretty printers: end iterator invalid pointer

2016-12-13 Thread jan.kratochvil at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59170 --- Comment #12 from Jan Kratochvil --- (In reply to Jonathan Wakely from comment #7) > That doesn't help: > > std::vector::iterator it; > { > std::vector v{1}; > it = v.begin(); > } > > The iterator is safely initialized,

[Bug libstdc++/59170] pretty printers: end iterator invalid pointer

2016-12-13 Thread jan.kratochvil at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59170 --- Comment #11 from Jan Kratochvil --- (In reply to Jonathan Wakely from comment #9) > Most developers don't even know the debug mode exists. That's a problem communicating it to users. -O0 -g would be best to always use -D_GLIBCXX_DEBUG if

[Bug libstdc++/59170] pretty printers: end iterator invalid pointer

2016-12-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59170 --- Comment #10 from Jonathan Wakely --- (In reply to Jan Kratochvil from comment #6) > This all depends more on a different non-pretty-printers feature I plan to > file for libstdc++ for years but I have never done so yet. With >

[Bug libstdc++/59170] pretty printers: end iterator invalid pointer

2016-12-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59170 --- Comment #9 from Jonathan Wakely --- (In reply to Jan Kratochvil from comment #8) > (In reply to Jonathan Wakely from comment #7) > > But most code isn't compiled with debug mode enabled. > > IMO all code for debugging with pretty printers

[Bug libstdc++/59170] pretty printers: end iterator invalid pointer

2016-12-13 Thread jan.kratochvil at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59170 --- Comment #8 from Jan Kratochvil --- (In reply to Jonathan Wakely from comment #7) > That doesn't help: > > std::vector::iterator it; > { > std::vector v{1}; > it = v.begin(); > } > > The iterator is safely initialized,

[Bug libstdc++/59170] pretty printers: end iterator invalid pointer

2016-12-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59170 --- Comment #7 from Jonathan Wakely --- (In reply to Jan Kratochvil from comment #6) > (In reply to Jonathan Wakely from comment #5) > > I think it's simply wrong to automatically dereference iterators. GDB > > doesn't do that when printing

[Bug libstdc++/59170] pretty printers: end iterator invalid pointer

2016-12-13 Thread jan.kratochvil at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59170 --- Comment #6 from Jan Kratochvil --- (In reply to Jonathan Wakely from comment #5) > I think it's simply wrong to automatically dereference iterators. GDB > doesn't do that when printing pointers, so why do the pretty printers do it > for

[Bug libstdc++/59170] pretty printers: end iterator invalid pointer

2016-12-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59170 --- Comment #5 from Jonathan Wakely --- I think it's simply wrong to automatically dereference iterators. GDB doesn't do that when printing pointers, so why do the pretty printers do it for iterators? There are loads of cases where it does the

[Bug libstdc++/59170] pretty printers: end iterator invalid pointer

2016-12-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59170 Jonathan Wakely changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|