public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/60386] New: [C++11] Crash on a template class containing array initialized in-class
@ 2014-03-02 11:04 a.matveyakin at gmail dot com
  2014-03-03  9:03 ` [Bug c++/60386] [C++11][NSDMI] " rguenth at gcc dot gnu.org
  2014-03-18 18:41 ` paolo.carlini at oracle dot com
  0 siblings, 2 replies; 3+ messages in thread
From: a.matveyakin at gmail dot com @ 2014-03-02 11:04 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 60386
           Summary: [C++11] Crash on a template class containing array
                    initialized in-class
           Product: gcc
           Version: 4.8.2
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: a.matveyakin at gmail dot com

Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.8.2-15ubuntu3'
--with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs
--enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.8 --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls
--with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug
--enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap
--enable-plugin --with-system-zlib --disable-browser-plugin
--enable-java-awt=gtk --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre --enable-java-home
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64
--with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686
--with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu
Thread model: posix
gcc version 4.8.2 (Ubuntu 4.8.2-15ubuntu3) 


Compiling the code below with “g++ -std=c++11 filename.cpp” causes segmentation
fault in the compiler.


class A
{
};

template<typename T>
class B
{
public:
  A v[1] = {};
};

B<int> b;
>From gcc-bugs-return-445203-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sun Mar 02 12:04:16 2014
Return-Path: <gcc-bugs-return-445203-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 8818 invoked by alias); 2 Mar 2014 12:04:16 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 8784 invoked by uid 48); 2 Mar 2014 12:04:11 -0000
From: "m_nistor at yahoo dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/60387] New: The gcc compiler for the ppc architecture is not compatible with PPC ABI and DWARF standards.
Date: Sun, 02 Mar 2014 12:04:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 4.8.1
X-Bugzilla-Keywords:
X-Bugzilla-Severity: critical
X-Bugzilla-Who: m_nistor at yahoo dot com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter
Message-ID: <bug-60387-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-03/txt/msg00072.txt.bz2
Content-length: 3334

http://gcc.gnu.org/bugzilla/show_bug.cgi?id`387

            Bug ID: 60387
           Summary: The gcc compiler for the ppc architecture is not
                    compatible with PPC ABI and DWARF standards.
           Product: gcc
           Version: 4.8.1
            Status: UNCONFIRMED
          Severity: critical
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: m_nistor at yahoo dot com

The gcc compiler for the ppc architecture doesn't use DWARF Register Number
Mapping that is defined in the PPC ABI standards. Just an example for the first
vector register (vr0): the ppc gcc generates 100 instead of 1124.

The gcc compiler doesn't emit .debug_frame section and it prefers to emit only
the .eh_fram e section.
The .eh_frame section is used by application to handle the exception. This
section is part of the C++ ABI.
The .eh_frame section is not a debug section and this section should not be
used by debugger for unwinding stack frame, this statement was also done by
Michael Eager who is Chair of DWARF Standards Committee Members. You can see
below more information about this:
http://wiki.dwarfstd.org/index.php?title=Exception_Handling

Relationship with DWARF
Although the C++ ABI data in the .eh_frame section uses the data format
described by the DWARF Standard (with some extensions), this section (and other
sections used by exception handling, such as .eh_frame_hdr and
.gcc_except_table) are not defined by the DWARF Standard. The DWARF Standard
does not describe the extensions to support exception handling nor the routines
which must be called by a program to use this data. The DWARF Debugging Format
Committee does not specify the contents of these sections or the functionality
which must be provided by the language run time system to support exception
handling.
The .eh_frame section is not used for debugging. Whether it is generated or not
is independent of whether DWARF debug data is generated. All DWARF data is
contained in sections with names starting with .debug, which may be removed
from a program without affecting the program's normal execution. It is common
practice to "strip" debugging sections from a program before putting it into
production, either to reduce the program size, make reverse engineering more
difficult, or both.
Removing the .eh_frame section (whether the DWARF .debug sections are left in
place or not) has a high likelihood of adversely affecting a program's
behaviour, especially when it encounters an unexpected condition.
Unfortunately, it has been a common shorthand to refer to the C++ ABI exception
handling methodology using .eh_frame with "DWARF exception handling," or
similar phrases. Perhaps this because it is easier to say this than the
unwieldy "C++ exception handling using the DWARF Call Frame Information format
with extensions", or the misleading "C++ ABI for IA-64" or "SVR4 ABI AMD64
Processor Supplement", especially when discussing a processor other than
Itanium or AMD-64. This leads to occasional confusion, where people may look at
the DWARF Specification for a description of the C++ ABI exception handling
method, or where vulnerabilities in the EH scheme are incorrectly characterized
as DWARF vulnerabilities, as in the otherwise excellent paper mentioned below.


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

* [Bug c++/60386] [C++11][NSDMI] Crash on a template class containing array initialized in-class
  2014-03-02 11:04 [Bug c++/60386] New: [C++11] Crash on a template class containing array initialized in-class a.matveyakin at gmail dot com
@ 2014-03-03  9:03 ` rguenth at gcc dot gnu.org
  2014-03-18 18:41 ` paolo.carlini at oracle dot com
  1 sibling, 0 replies; 3+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-03-03  9:03 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-03-03
            Summary|[C++11] Crash on a template |[C++11][NSDMI] Crash on a
                   |class containing array      |template class containing
                   |initialized in-class        |array initialized in-class
     Ever confirmed|0                           |1
      Known to fail|                            |4.7.2, 4.8.2, 4.9.0

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.


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

* [Bug c++/60386] [C++11][NSDMI] Crash on a template class containing array initialized in-class
  2014-03-02 11:04 [Bug c++/60386] New: [C++11] Crash on a template class containing array initialized in-class a.matveyakin at gmail dot com
  2014-03-03  9:03 ` [Bug c++/60386] [C++11][NSDMI] " rguenth at gcc dot gnu.org
@ 2014-03-18 18:41 ` paolo.carlini at oracle dot com
  1 sibling, 0 replies; 3+ messages in thread
From: paolo.carlini at oracle dot com @ 2014-03-18 18:41 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Dup.

*** This bug has been marked as a duplicate of bug 58704 ***


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

end of thread, other threads:[~2014-03-18 18:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-02 11:04 [Bug c++/60386] New: [C++11] Crash on a template class containing array initialized in-class a.matveyakin at gmail dot com
2014-03-03  9:03 ` [Bug c++/60386] [C++11][NSDMI] " rguenth at gcc dot gnu.org
2014-03-18 18:41 ` paolo.carlini at oracle dot com

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).