[llvm-bugs] [Bug 30534] New: crash on c++ code on x86_64-linux-gnu (Assertion `II && "Attempt to mangle unnamed decl."' failed.)
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Sep 27 01:07:02 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=30534
Bug ID: 30534
Summary: crash on c++ code on x86_64-linux-gnu (Assertion `II
&& "Attempt to mangle unnamed decl."' failed.)
Product: clang
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: chengniansun at gmail.com
CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
Classification: Unclassified
$ clang-trunk -v
clang version 4.0.0 (trunk 282414)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
Found candidate GCC installation: /usr/bin/../lib/gcc/i686-linux-gnu/5
Found candidate GCC installation: /usr/bin/../lib/gcc/i686-linux-gnu/5.3.0
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.8.5
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9.3
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/5
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/5.3.0
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/5.3.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8.5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9.3
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.3.0
Selected GCC installation: /usr/bin/../lib/gcc/x86_64-linux-gnu/4.9
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64
$
$ clang-trunk small.C
small.C:2:1: warning: empty union has size 0 in C, size 1 in C++
[-Wextern-c-compat]
union {};
^
clang-4.0:
/tmp/llvm-builder/llvm-source-trunk/tools/clang/lib/CodeGen/CodeGenModule.cpp:685:
llvm::StringRef
clang::CodeGen::CodeGenModule::getMangledName(clang::GlobalDecl): Assertion `II
&& "Attempt to mangle unnamed decl."' failed.
#0 0x0000000001c98a25 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/usr/local/clang-trunk/bin/clang-4.0+0x1c98a25)
#1 0x0000000001c969ce llvm::sys::RunSignalHandlers()
(/usr/local/clang-trunk/bin/clang-4.0+0x1c969ce)
#2 0x0000000001c96b32 SignalHandler(int)
(/usr/local/clang-trunk/bin/clang-4.0+0x1c96b32)
#3 0x00007f13a1a33340 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x10340)
#4 0x00007f13a0824cc9 gsignal
/build/eglibc-3GlaMS/eglibc-2.19/signal/../nptl/sysdeps/unix/sysv/linux/raise.c:56:0
#5 0x00007f13a08280d8 abort
/build/eglibc-3GlaMS/eglibc-2.19/stdlib/abort.c:91:0
#6 0x00007f13a081db86 __assert_fail_base
/build/eglibc-3GlaMS/eglibc-2.19/assert/assert.c:92:0
#7 0x00007f13a081dc32 (/lib/x86_64-linux-gnu/libc.so.6+0x2fc32)
#8 0x0000000001e75927
clang::CodeGen::CodeGenModule::getMangledName(clang::GlobalDecl)
(/usr/local/clang-trunk/bin/clang-4.0+0x1e75927)
#9 0x0000000001e7e4ee
clang::CodeGen::CodeGenModule::GetAddrOfGlobalVar(clang::VarDecl const*,
llvm::Type*, bool) (/usr/local/clang-trunk/bin/clang-4.0+0x1e7e4ee)
#10 0x0000000001e7cdec
clang::CodeGen::CodeGenModule::EmitGlobalVarDefinition(clang::VarDecl const*,
bool) (/usr/local/clang-trunk/bin/clang-4.0+0x1e7cdec)
#11 0x0000000001e94b71
clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl,
llvm::GlobalValue*) (/usr/local/clang-trunk/bin/clang-4.0+0x1e94b71)
#12 0x0000000001e96060
clang::CodeGen::CodeGenModule::EmitGlobal(clang::GlobalDecl)
(/usr/local/clang-trunk/bin/clang-4.0+0x1e96060)
#13 0x0000000001e965f5
clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) [clone
.part.5751] (/usr/local/clang-trunk/bin/clang-4.0+0x1e965f5)
#14 0x0000000001e97477
clang::CodeGen::CodeGenModule::EmitDeclContext(clang::DeclContext const*)
(/usr/local/clang-trunk/bin/clang-4.0+0x1e97477)
#15 0x0000000001e96cc7
clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) [clone
.part.5751] (/usr/local/clang-trunk/bin/clang-4.0+0x1e96cc7)
#16 0x00000000023fe773 (anonymous
namespace)::CodeGeneratorImpl::HandleTopLevelDecl(clang::DeclGroupRef)
(/usr/local/clang-trunk/bin/clang-4.0+0x23fe773)
#17 0x00000000023f880d
clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef)
(/usr/local/clang-trunk/bin/clang-4.0+0x23f880d)
#18 0x00000000027cda56 clang::ParseAST(clang::Sema&, bool, bool)
(/usr/local/clang-trunk/bin/clang-4.0+0x27cda56)
#19 0x00000000023f94be clang::CodeGenAction::ExecuteAction()
(/usr/local/clang-trunk/bin/clang-4.0+0x23f94be)
#20 0x000000000210bf96 clang::FrontendAction::Execute()
(/usr/local/clang-trunk/bin/clang-4.0+0x210bf96)
#21 0x00000000020e668e
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/usr/local/clang-trunk/bin/clang-4.0+0x20e668e)
#22 0x0000000002193f76
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/usr/local/clang-trunk/bin/clang-4.0+0x2193f76)
#23 0x0000000000a82f08 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/usr/local/clang-trunk/bin/clang-4.0+0xa82f08)
#24 0x0000000000a2b861 main (/usr/local/clang-trunk/bin/clang-4.0+0xa2b861)
#25 0x00007f13a080fec5 __libc_start_main
/build/eglibc-3GlaMS/eglibc-2.19/csu/libc-start.c:321:0
#26 0x0000000000a7ef2e _start (/usr/local/clang-trunk/bin/clang-4.0+0xa7ef2e)
Stack dump:
0. Program arguments: /usr/local/clang-trunk/bin/clang-4.0 -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free -main-file-name
small.C -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/local/clang-trunk/bin/../lib/clang/4.0.0 -c-isystem .
-c-isystem /usr/local/include/csmith -c-isystem /usr/local/include/csmith
-internal-isystem
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9
-internal-isystem
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/x86_64-linux-gnu/c++/4.9
-internal-isystem
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/x86_64-linux-gnu/c++/4.9
-internal-isystem
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.9/../../../../include/c++/4.9/backward
-internal-isystem /usr/local/include -internal-isystem
/usr/local/clang-trunk/bin/../lib/clang/4.0.0/include -internal-externc-isystem
/usr/include/x86_64-linux-gnu -internal-externc-isystem /include
-internal-externc-isystem /usr/include -fdeprecated-macro
-fdebug-compilation-dir
/home/cnsun/workspace/meta-compiler/error-fuzzer/exp-runs/crash/RandomTokenManipulationFuzzingEngine/20160922-clang++-trunk--Weverything-O3-c-std=c++14-build-102824/reduction
-ferror-limit 19 -fmessage-length 261 -fobjc-runtime=gcc -fcxx-exceptions
-fexceptions -fdiagnostics-show-option -fcolor-diagnostics -o
/tmp/small-8c3f4f.o -x c++ small.C
1. <eof> parser at end of file
2. small.C:1:8: LLVM IR generation of declaration
3. small.C:2:1: Generating code for declaration '(anonymous)'
clang-4.0: error: unable to execute command: Aborted (core dumped)
clang-4.0: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 4.0.0 (trunk 282414)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
clang-4.0: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and
associated run script.
clang-4.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-4.0: note: diagnostic msg: /tmp/small-f1ebfc.cpp
clang-4.0: note: diagnostic msg: /tmp/small-f1ebfc.sh
clang-4.0: note: diagnostic msg:
********************
$
$ cat small.C
extern "C" {
union {};
}
$
--
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/20160927/94002edf/attachment-0001.html>
More information about the llvm-bugs
mailing list