RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1076690 - Python Exception <type 'exceptions.IndexError'> list index out of range:
Summary: Python Exception <type 'exceptions.IndexError'> list index out of range:
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: gcc
Version: 7.0
Hardware: All
OS: All
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Jakub Jelinek
QA Contact: Michael Petlan
URL:
Whiteboard:
Depends On:
Blocks: 1110700 1191021
TreeView+ depends on / blocked
 
Reported: 2014-03-14 20:31 UTC by Mark Wielaard
Modified: 2016-11-04 06:25 UTC (History)
9 users (show)

Fixed In Version: gcc-4.8.5-6.el7
Doc Type: No Doc Update
Doc Text:
undefined
Clone Of:
Environment:
Last Closed: 2016-11-04 06:25:18 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
GNU Compiler Collection 53477 0 None None None Never
Red Hat Product Errata RHBA-2016:2433 0 normal SHIPPED_LIVE gcc bug fix and enhancement update 2016-11-03 14:01:11 UTC
Sourceware 15195 0 None None None Never

Description Mark Wielaard 2014-03-14 20:31:58 UTC
Description of problem:

While debugging some Python Exception occurs.


Breakpoint 1, dwarf_builder::build (this=0x11b8a8e0, sess=..., 
Python Exception <type 'exceptions.IndexError'> list index out of range: 
     base=0x11aee390, location=0x119abc70, parameters=std::map with 2 elements, 
     finished_results=std::vector of length 0, capacity 0) at tapsets.cxx:7215
 7215 {

(gdb) set python print-stack full
(gdb) bt
#0  dwarf_builder::build (this=0x11b8a8e0, sess=..., base=0x11aee390, 
    location=0x119abc70, Traceback (most recent call last):
  File "/lib64/../share/gcc-4.8.2/python/libstdcxx/v6/printers.py", line 438, in children
    rep_type = find_type(self.val.type, '_Rep_type')
  File "/lib64/../share/gcc-4.8.2/python/libstdcxx/v6/printers.py", line 52, in find_type
    field = typ.fields()[0]
IndexError: list index out of range
parameters=
std::map with 2 elements, finished_results=std::vector of length 0, capacity 0)
    at tapsets.cxx:7215


Version-Release number of selected component (if applicable):

gdb-7.6.1-51.el7.ppc64
gcc-4.8.2-15.el7.ppc64

Comment 2 RHEL Program Management 2014-03-22 05:47:46 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 5 Martin Sebor 2015-02-26 18:02:28 UTC
Here's a small test case:

$ cat t.cpp && gdb -batch -q -ex "b foo" -ex "set python print-stack full" -ex "run" -ex "bt" a.out 
#include <map>

typedef std::map<int, void*> M;

M::size_type foo (M &m)
{
    return m.size ();
}

int main (void) {
    M m;

    m[1] = (void*)1;

    foo (m);
}
Breakpoint 1 at 0x10000a1c: file t.cpp, line 7.

Breakpoint 1, foo (m=Traceback (most recent call last):
  File "/lib64/../share/gcc-4.8.3/python/libstdcxx/v6/printers.py", line 482, in children
    rep_type = find_type(self.val.type, '_Rep_type')
  File "/lib64/../share/gcc-4.8.3/python/libstdcxx/v6/printers.py", line 96, in find_type
    field = typ.fields()[0]
IndexError: list index out of range
std::map with 1 elements) at t.cpp:7
7	    return m.size ();
#0  foo (m=Traceback (most recent call last):
  File "/lib64/../share/gcc-4.8.3/python/libstdcxx/v6/printers.py", line 482, in children
    rep_type = find_type(self.val.type, '_Rep_type')
  File "/lib64/../share/gcc-4.8.3/python/libstdcxx/v6/printers.py", line 96, in find_type
    field = typ.fields()[0]
IndexError: list index out of range
std::map with 1 elements) at t.cpp:7
#1  0x0000000010000ab0 in main () at t.cpp:15

Comment 6 Martin Sebor 2015-02-26 18:12:09 UTC
I should have mentioned that the problem can be reproduced on both ppc64 and ppc64le with the stock RHEL 7.1 GCC (with no special options other than -g) and GDB. I couldn't reproduce it on Fedora 21 x86_64 with the stock tool chain and I am yet to try RHEL 7.1 x86_64.

Comment 7 Martin Sebor 2015-02-26 21:40:49 UTC
The same problem can be reproduced on RHEL 7.1 x86_64.  It's fixed by libstdc++ commit df1ac917c9ce90beb8c3804c2d92cb47b337de30 upstream.  The relevant bugs are GDB/15195 and libstdc++/53477.

Comment 9 Martin Sebor 2016-05-02 15:02:42 UTC
The bug affects other targets besides powerpc.

Comment 11 Michael Petlan 2016-07-25 09:31:47 UTC
test fails with gcc-4.8.5-4.el7
test passes for gcc-4.8.5-9.el7

VERIFIED

Comment 13 errata-xmlrpc 2016-11-04 06:25:18 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-2433.html


Note You need to log in before you can comment on or make changes to this bug.