[llvm-bugs] [Bug 45239] New: Crash (segmentation fault) in clang::Sema::DiagnoseUnexpandedParameterPack
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Mar 18 09:15:33 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=45239
Bug ID: 45239
Summary: Crash (segmentation fault) in
clang::Sema::DiagnoseUnexpandedParameterPack
Product: clang
Version: 9.0
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: t.priesner at gmail.com
CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
richard-llvm at metafoo.co.uk
Created attachment 23252
--> https://bugs.llvm.org/attachment.cgi?id=23252&action=edit
Preprocessed source file
While compiling a source file containing an incorrect include (file not found),
if ran into the following segementation fault.
I reduced the source with creduce and attached it to this bug.
I also still have the original (unreduced) file if needed.
Note: the unreduced file crashes in another function
(clang::NestedNameSpecifier::isDependent())
$ clang --version
clang version 9.0.1
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
$ cat /etc/os-release
NAME="openSUSE Tumbleweed"
# VERSION="20200314"
...
Stack dump:
0. Program arguments: /usr/bin/clang-9.0.1 -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free
-disable-llvm-verifier -discard-value-names -main-file-name bug.cpp
-mrelocation-model static -mthread-model posix -mdisable-fp-elim -fmath-errno
-masm-verbose -mconstructor-aliases -munwind-tables -fuse-init-array
-target-cpu x86-64 -dwarf-column-info -debugger-tuning=gdb -resource-dir
/usr/lib64/clang/9.0.1 -internal-isystem
/usr/bin/../lib64/gcc/x86_64-suse-linux/9/../../../../include/c++/9
-internal-isystem
/usr/bin/../lib64/gcc/x86_64-suse-linux/9/../../../../include/c++/9/x86_64-suse-linux
-internal-isystem
/usr/bin/../lib64/gcc/x86_64-suse-linux/9/../../../../include/c++/9/backward
-internal-isystem /usr/local/include -internal-isystem
/usr/lib64/clang/9.0.1/include -internal-externc-isystem /include
-internal-externc-isystem /usr/include -fdeprecated-macro
-fdebug-compilation-dir /dev/shm -ferror-limit 19 -fmessage-length 0
-fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option
-fcolor-diagnostics -faddrsig -o /tmp/bug-e490fe.o -x c++ bug.cpp
1. <eof> parser at end of file
#0 0x00007f62c06c3ced llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/usr/bin/../lib64/libLLVM.so.9+0xa9dced)
#1 0x00007f62c06c1790 llvm::sys::RunSignalHandlers()
(/usr/bin/../lib64/libLLVM.so.9+0xa9b790)
#2 0x00007f62c06c4234 (/usr/bin/../lib64/libLLVM.so.9+0xa9e234)
#3 0x00007f62c723e1e0 __restore_rt (/lib64/libpthread.so.0+0x141e0)
#4 0x00007f62c5b100e9
clang::Sema::DiagnoseUnexpandedParameterPack(clang::CXXScopeSpec const&,
clang::Sema::UnexpandedParameterPackContext)
(/usr/bin/../lib64/libclang-cpp.so.9+0x14850e9)
#5 0x00007f62c552dd80 clang::Sema::HandleDeclarator(clang::Scope*,
clang::Declarator&, llvm::MutableArrayRef<clang::TemplateParameterList*>)
(/usr/bin/../lib64/libclang-cpp.so.9+0xea2d80)
#6 0x00007f62c552db58 clang::Sema::ActOnDeclarator(clang::Scope*,
clang::Declarator&) (/usr/bin/../lib64/libclang-cpp.so.9+0xea2b58)
#7 0x00007f62c4e05234
clang::Parser::ParseDeclarationAfterDeclaratorAndAttributes(clang::Declarator&,
clang::Parser::ParsedTemplateInfo const&, clang::Parser::ForRangeInit*)
(/usr/bin/../lib64/libclang-cpp.so.9+0x77a234)
#8 0x00007f62c4e03c00 clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&,
clang::DeclaratorContext, clang::SourceLocation*, clang::Parser::ForRangeInit*)
(/usr/bin/../lib64/libclang-cpp.so.9+0x778c00)
#9 0x00007f62c4eaf497
clang::Parser::ParseDeclOrFunctionDefInternal(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec&, clang::AccessSpecifier)
(/usr/bin/../lib64/libclang-cpp.so.9+0x824497)
#10 0x00007f62c4eaedd4
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*, clang::AccessSpecifier)
(/usr/bin/../lib64/libclang-cpp.so.9+0x823dd4)
#11 0x00007f62c4eadbdc
clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,
clang::ParsingDeclSpec*) (/usr/bin/../lib64/libclang-cpp.so.9+0x822bdc)
#12 0x00007f62c4eab7ad
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, bool)
(/usr/bin/../lib64/libclang-cpp.so.9+0x8207ad)
#13 0x00007f62c4debbbd clang::ParseAST(clang::Sema&, bool, bool)
(/usr/bin/../lib64/libclang-cpp.so.9+0x760bbd)
#14 0x00007f62c5e18c13 clang::CodeGenAction::ExecuteAction()
(/usr/bin/../lib64/libclang-cpp.so.9+0x178dc13)
#15 0x00007f62c6691964 clang::FrontendAction::Execute()
(/usr/bin/../lib64/libclang-cpp.so.9+0x2006964)
#16 0x00007f62c664e0d0
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/usr/bin/../lib64/libclang-cpp.so.9+0x1fc30d0)
#17 0x00007f62c6705c0e
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/usr/bin/../lib64/libclang-cpp.so.9+0x207ac0e)
#18 0x000000000049a069 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/usr/bin/clang-9.0.1+0x49a069)
#19 0x0000000000498562 main (/usr/bin/clang-9.0.1+0x498562)
#20 0x00007f62bf76aceb __libc_start_main (/lib64/libc.so.6+0x26ceb)
#21 0x000000000049546a _start (/usr/bin/clang-9.0.1+0x49546a)
clang-9.0: error: unable to execute command: Segmentation fault (core dumped)
clang-9.0: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 9.0.1
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
clang-9.0: note: diagnostic msg: PLEASE submit a bug report to
https://bugs.llvm.org/ and include the crash backtrace, preprocessed source,
and associated run script.
clang-9.0: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-9.0: note: diagnostic msg: /tmp/bug-ebedc8.cpp
clang-9.0: note: diagnostic msg: /tmp/bug-ebedc8.sh
clang-9.0: note: diagnostic msg:
********************
--
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/20200318/003c2d6c/attachment-0001.html>
More information about the llvm-bugs
mailing list