gdb/30: gdb could use cycle-checking code for type lookups

chastain@redhat.com chastain@redhat.com
Mon Feb 19 11:38:00 GMT 2001


>Number:         30
>Category:       gdb
>Synopsis:       gdb could use cycle-checking code for type lookups
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon Feb 19 11:37:59 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     chastain@redhat.com
>Release:        cvs gdb 2001-02-19
>Organization:
>Environment:
Solaris 2.6 native
Red Hat Linux 7 native
>Description:
On two occasions in the past two months, CVS versions of
gdb have crashed on me due to infinite recursion while
walking a type tree with a cycle in it.  One of these
occasions was PR gdb/15 ("lookup_block_symbol ignores
namespace parameters in binary search"), which is now fixed.
The other occastion was a transient that disappeared when
I fetched a new g++.

Any particular cycle is a bug in itself.  My enhancement
request is: make gdb more alert to catching and reporting
cycles, so that these bugs get exposed sooner and reported
with useful details.
>How-To-Repeat:

>Fix:
Suggested fix:

(1) Add diagnostic code that walks the type tree and looks
for cycles, emitting messages for the cycles that it finds.

(2) Add a call to the cycle checker when loading type
information from an executable or a shared library.

(3) Add an explicit "maint ..." command that calls the
cycle checker.

(4) Invoke the explicit "maint ..." command in
gdb.base/selftest.exp and also in some of the gdb.c++/*.exp tests
(c++ programs bring in a big c++ library that needs
checking).  Check the results and FAIL if a type tree
cycle is found.  That gets some FAILs up where people will
see them.

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gdb-prs mailing list