public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/45999] New: runtime error in std::vector python pretty printer.
@ 2010-10-13  8:54 pluto at agmk dot net
  2010-10-13  9:16 ` [Bug libstdc++/45999] " redi at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: pluto at agmk dot net @ 2010-10-13  8:54 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45999

           Summary: runtime error in std::vector python pretty printer.
           Product: gcc
           Version: 4.5.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: pluto@agmk.net
              Host: x86_64-gnu-linux
            Target: x86_64-gnu-linux
             Build: x86_64-gnu-linux


Created attachment 22026
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22026
reduced testcase.

Breakpoint 1, main () at t.cpp:156
156             bidir_graph_t g ( 5 );
(gdb) n
157             g.add_edge ( bdir_edge_t ( 3, 2 ) );
(gdb) p g
$1 = {
  <au::graph::BidirectionalGraph<int>> = {<No data fields>},
  members of au::graph::adjacency_matrix<int, au::graph::BidirectionalGraph>:
  static npos = <optimized out>,
  size_ = 5,
  verticles_ = std::vector of length 0, capacity 5,
  adjacency_matrix_ = std::vector of length 5, capacity 5 = {
    Traceback (most recent call last):
  File
"/local/devel/toolchain45/x86_64-gnu-linux.mt_alloc/share/gcc-4.5.2/python/libstdcxx/v6/printers.py",
line 186, in to_string
    % (self.typename, int (finish - start), int (end - start)))
RuntimeError: Argument to arithmetic operation not a number or boolean.
Traceback (most recent call last):
  File
"/local/devel/toolchain45/x86_64-gnu-linux.mt_alloc/share/gcc-4.5.2/python/libstdcxx/v6/printers.py",
line 169, in next
    elt = self.item.dereference()
RuntimeError: Attempt to take contents of a non-pointer value.
(...)


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libstdc++/45999] runtime error in std::vector python pretty printer.
  2010-10-13  8:54 [Bug libstdc++/45999] New: runtime error in std::vector python pretty printer pluto at agmk dot net
@ 2010-10-13  9:16 ` redi at gcc dot gnu.org
  2010-10-13  9:43 ` redi at gcc dot gnu.org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: redi at gcc dot gnu.org @ 2010-10-13  9:16 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45999

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2010.10.13 09:16:30
         AssignedTo|unassigned at gcc dot       |redi at gcc dot gnu.org
                   |gnu.org                     |
     Ever Confirmed|0                           |1


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libstdc++/45999] runtime error in std::vector python pretty printer.
  2010-10-13  8:54 [Bug libstdc++/45999] New: runtime error in std::vector python pretty printer pluto at agmk dot net
  2010-10-13  9:16 ` [Bug libstdc++/45999] " redi at gcc dot gnu.org
@ 2010-10-13  9:43 ` redi at gcc dot gnu.org
  2010-10-14 10:53 ` pluto at agmk dot net
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: redi at gcc dot gnu.org @ 2010-10-13  9:43 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45999

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2010-10-13 09:42:58 UTC ---
Reduced

#include <vector>

int main()
{
    std::vector<bool> b(4);
    b.push_back(1);
    return 0;
}


There's no pretty printer for vector<bool>


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libstdc++/45999] runtime error in std::vector python pretty printer.
  2010-10-13  8:54 [Bug libstdc++/45999] New: runtime error in std::vector python pretty printer pluto at agmk dot net
  2010-10-13  9:16 ` [Bug libstdc++/45999] " redi at gcc dot gnu.org
  2010-10-13  9:43 ` redi at gcc dot gnu.org
@ 2010-10-14 10:53 ` pluto at agmk dot net
  2010-10-18 19:16 ` redi at gcc dot gnu.org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pluto at agmk dot net @ 2010-10-14 10:53 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45999

--- Comment #2 from Pawel Sikora <pluto at agmk dot net> 2010-10-14 10:53:03 UTC ---
(In reply to comment #1)
> Reduced
> 
> #include <vector>
> 
> int main()
> {
>     std::vector<bool> b(4);
>     b.push_back(1);
>     return 0;
> }
> 
> 
> There's no pretty printer for vector<bool>

seems to fixed on trunk:
http://gcc.gnu.org/viewcvs?view=revision&revision=163282
can we get a backport for this fix on 4.5 branch?


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libstdc++/45999] runtime error in std::vector python pretty printer.
  2010-10-13  8:54 [Bug libstdc++/45999] New: runtime error in std::vector python pretty printer pluto at agmk dot net
                   ` (2 preceding siblings ...)
  2010-10-14 10:53 ` pluto at agmk dot net
@ 2010-10-18 19:16 ` redi at gcc dot gnu.org
  2010-10-26 10:27 ` pluto at agmk dot net
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: redi at gcc dot gnu.org @ 2010-10-18 19:16 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45999

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
      Known to work|                            |4.6.0
         Resolution|                            |FIXED
   Target Milestone|---                         |4.5.2

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> 2010-10-18 19:16:03 UTC ---
I've backported the fix:
http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=165658

Thanks for trying the printers and submitting bug reports, Pawel


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libstdc++/45999] runtime error in std::vector python pretty printer.
  2010-10-13  8:54 [Bug libstdc++/45999] New: runtime error in std::vector python pretty printer pluto at agmk dot net
                   ` (3 preceding siblings ...)
  2010-10-18 19:16 ` redi at gcc dot gnu.org
@ 2010-10-26 10:27 ` pluto at agmk dot net
  2010-10-26 10:48 ` redi at gcc dot gnu.org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pluto at agmk dot net @ 2010-10-26 10:27 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45999

--- Comment #4 from Pawel Sikora <pluto at agmk dot net> 2010-10-26 10:27:02 UTC ---
(In reply to comment #3)
> I've backported the fix:
> http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=165658
> 
> Thanks for trying the printers and submitting bug reports, Pawel

btw. just FYI, this change causes syntax-error on python-2.4 based distros.

Traceback (most recent call last):
  File "<string>", line 3, in ?
  File
"/local/devel/toolchain45/x86_64-gnu-linux.mt_alloc/share/gcc-4.5.2/python/libstdcxx/v6/printers.py",
line 180
    obit = 1 if elt & (1 << self.so) else 0
              ^
SyntaxError: invalid syntax
/ahome/pawels/.gdbinit:14: Error in sourced command file:
Error while executing Python code.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libstdc++/45999] runtime error in std::vector python pretty printer.
  2010-10-13  8:54 [Bug libstdc++/45999] New: runtime error in std::vector python pretty printer pluto at agmk dot net
                   ` (4 preceding siblings ...)
  2010-10-26 10:27 ` pluto at agmk dot net
@ 2010-10-26 10:48 ` redi at gcc dot gnu.org
  2010-10-26 11:30 ` pluto at agmk dot net
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: redi at gcc dot gnu.org @ 2010-10-26 10:48 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45999

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> 2010-10-26 10:48:23 UTC ---
that must be present on trunk too, right?

if GDB can be built with python 2.4 then our pretty printers should work with
it too, I can change that printer to avoid using the conditional expression


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libstdc++/45999] runtime error in std::vector python pretty printer.
  2010-10-13  8:54 [Bug libstdc++/45999] New: runtime error in std::vector python pretty printer pluto at agmk dot net
                   ` (5 preceding siblings ...)
  2010-10-26 10:48 ` redi at gcc dot gnu.org
@ 2010-10-26 11:30 ` pluto at agmk dot net
  2010-11-01 21:28 ` redi at gcc dot gnu.org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pluto at agmk dot net @ 2010-10-26 11:30 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45999

--- Comment #6 from Pawel Sikora <pluto at agmk dot net> 2010-10-26 11:29:58 UTC ---
(In reply to comment #5)
> that must be present on trunk too, right?

this is a backport from, so probably trunk is affected too.

> if GDB can be built with python 2.4 then our pretty printers should work with
> it too, I can change that printer to avoid using the conditional expression

gdb-7.2 builds/works fine on centos-5.x (RHEL5 equivalent) python-2.4
enviroment.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libstdc++/45999] runtime error in std::vector python pretty printer.
  2010-10-13  8:54 [Bug libstdc++/45999] New: runtime error in std::vector python pretty printer pluto at agmk dot net
                   ` (6 preceding siblings ...)
  2010-10-26 11:30 ` pluto at agmk dot net
@ 2010-11-01 21:28 ` redi at gcc dot gnu.org
  2010-11-01 21:32 ` redi at gcc dot gnu.org
  2010-11-01 21:33 ` redi at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: redi at gcc dot gnu.org @ 2010-11-01 21:28 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45999

--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> 2010-11-01 21:28:48 UTC ---
Author: redi
Date: Mon Nov  1 21:28:44 2010
New Revision: 166150

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=166150
Log:
2010-11-01  Jonathan Wakely  <jwakely.gcc@gmail.com>

    PR libstdc++/45999
    * python/libstdcxx/v6/printers.py (StdVectorPrinter): Replace
    conditional expression with backward-compatible if-else.


Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/python/libstdcxx/v6/printers.py


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libstdc++/45999] runtime error in std::vector python pretty printer.
  2010-10-13  8:54 [Bug libstdc++/45999] New: runtime error in std::vector python pretty printer pluto at agmk dot net
                   ` (7 preceding siblings ...)
  2010-11-01 21:28 ` redi at gcc dot gnu.org
@ 2010-11-01 21:32 ` redi at gcc dot gnu.org
  2010-11-01 21:33 ` redi at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: redi at gcc dot gnu.org @ 2010-11-01 21:32 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45999

--- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> 2010-11-01 21:32:05 UTC ---
Author: redi
Date: Mon Nov  1 21:32:01 2010
New Revision: 166151

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=166151
Log:
2010-11-01  Jonathan Wakely  <jwakely.gcc@gmail.com>

    PR libstdc++/45999
    * python/libstdcxx/v6/printers.py (StdVectorPrinter): Replace
    conditional expression with backward-compatible if-else.


Modified:
    branches/gcc-4_5-branch/libstdc++-v3/ChangeLog
    branches/gcc-4_5-branch/libstdc++-v3/python/libstdcxx/v6/printers.py


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug libstdc++/45999] runtime error in std::vector python pretty printer.
  2010-10-13  8:54 [Bug libstdc++/45999] New: runtime error in std::vector python pretty printer pluto at agmk dot net
                   ` (8 preceding siblings ...)
  2010-11-01 21:32 ` redi at gcc dot gnu.org
@ 2010-11-01 21:33 ` redi at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: redi at gcc dot gnu.org @ 2010-11-01 21:33 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45999

--- Comment #9 from Jonathan Wakely <redi at gcc dot gnu.org> 2010-11-01 21:33:44 UTC ---
trunk and 4.5.2 should work with python 2.4 now


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2010-11-01 21:33 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-13  8:54 [Bug libstdc++/45999] New: runtime error in std::vector python pretty printer pluto at agmk dot net
2010-10-13  9:16 ` [Bug libstdc++/45999] " redi at gcc dot gnu.org
2010-10-13  9:43 ` redi at gcc dot gnu.org
2010-10-14 10:53 ` pluto at agmk dot net
2010-10-18 19:16 ` redi at gcc dot gnu.org
2010-10-26 10:27 ` pluto at agmk dot net
2010-10-26 10:48 ` redi at gcc dot gnu.org
2010-10-26 11:30 ` pluto at agmk dot net
2010-11-01 21:28 ` redi at gcc dot gnu.org
2010-11-01 21:32 ` redi at gcc dot gnu.org
2010-11-01 21:33 ` redi at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).