[llvm-bugs] [Bug 30831] New: Parser segmentation fault

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Oct 28 12:16:26 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=30831

            Bug ID: 30831
           Summary: Parser segmentation fault
           Product: clang
           Version: 3.9
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: jj.oconnor15 at gmail.com
                CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 17508
  --> https://llvm.org/bugs/attachment.cgi?id=17508&action=edit
contains test.cpp, the stack traces from 3.8 and 3.9, the above text, and the
/tmp files those stacks told me to include with a bug report

I wrote some nonsense code by accident and segfaulted the parser. It's short
enough to fit in here (it's only 8 lines):

__________________________
template <typename T>
class A {
public:
  static A<T> const a;
};

template <typename T>
A<T> A<T>::a = A<T>();
__________________________

The parser says it was on the token '=' when it died.

The compiler (specifically the parse step) crashes with this invocation:
$ clang++ test.cpp

Also:
$ clang++-3.9 test.cpp

Here's some OS and version information:

$ clang++ --version
clang version 3.8.0-2ubuntu4 (tags/RELEASE_380/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

$ clang++-3.9 --version
clang version 3.9.0-svn275918-1~exp1 (branches/release_39)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

$ cat /etc/*release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.1 LTS"
NAME="Ubuntu"
VERSION="16.04.1 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.1 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
UBUNTU_CODENAME=xenial

$ uname -a
Linux refraction 4.4.0-34-generic #53-Ubuntu SMP Wed Jul 27 16:06:39 UTC 2016
x86_64 x86_64 x86_64 GNU/Linux

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20161028/7d3f5b82/attachment.html>


More information about the llvm-bugs mailing list