[llvm-bugs] [Bug 52498] New: Clang++ parser segfault on a small file g++ compiles just fine
via llvm-bugs
llvm-bugs at lists.llvm.org
Sat Nov 13 11:05:01 PST 2021
https://bugs.llvm.org/show_bug.cgi?id=52498
Bug ID: 52498
Summary: Clang++ parser segfault on a small file g++ compiles
just fine
Product: clang
Version: 13.0
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: camille.brugel at laposte.net
CC: blitzrakete at gmail.com, dgregor at apple.com,
erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
richard-llvm at metafoo.co.uk
Created attachment 25448
--> https://bugs.llvm.org/attachment.cgi?id=25448&action=edit
TAR archive containing the preprocessed cpp, the full clang++ invocation in a
shell script, and the original file
Hello,
This is going to sound ironic but I discovered this bug while refactoring the
AST of my (not yet working) compiler. It is quite generic (using template
template parameters) but g++ is able to compile it. I can reproduce it in a
small file (see attachment).
guest at eb0013e54f13:/home/cbrugel/workspace/C++/dmit$ clang++ --version
Ubuntu clang version
13.0.1-++20211029101849+08e3a5ccd952-1~exp1~20211029222435.16
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
`clang++ --std=c++20 segfault.cpp` produces a segfault in the parser.
The code I was refactoring (which does compile with clang++):
https://github.com/matovitch/dmit/blob/96d666a48c4a3ae2083cdad5b415851df61f132a/lib/include/dmit/ast/node.hpp
Let me know if you need some more information.
Best Regards,
Camille BRUGEL
--
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/20211113/ad3e0b73/attachment-0001.html>
More information about the llvm-bugs
mailing list