Red Hat Bugzilla – Bug 1027003
g++ seg-faults on syntax error in vector<vector<T>> initializer
Last modified: 2016-01-31 21:28:49 EST
Created attachment 820014 [details]
Source code. Title is VTTest.C
Description of problem:
If a programmer mismatches angle brackets while using initializer lists to create a C++ vector<vector<T> > object, g++ can seg-fault instead of throwing a syntax error. An example is shown in the attached short piece of code.
Apologies if this has been fixed already. I'm new to this site and had trouble accessing the "frequently reported bugs" list; our web browser here at work is several years out of date.
Version-Release number of selected component (if applicable):
gcc version 4.4.7-3
Everything needed to reproduce this should be in the attached text.
Steps to Reproduce:
Compile the attached text with "g++ -std=gnu++0x -c VTTest.C".
While I was tracking down this bug, I came across an (apparently unrelated) second issue. I suspect the second issue is probably an error on my part rather than a bug. However, I decided to mention it anyways. It is described briefly as a "sidenote" in the definition of the Tag class in the attached text.
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.
Fixed by http://gcc.gnu.org/viewcvs/gcc?view=revision&revision=159045 -- safe and eligible for backport.
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.