[llvm-bugs] [Bug 37079] New: Assertion `Prior->Kind == MemberInfo::Field && !Prior->FD && "Only storage fields have tail padding!"' failed.

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Apr 10 17:07:13 PDT 2018


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

            Bug ID: 37079
           Summary: Assertion `Prior->Kind == MemberInfo::Field &&
                    !Prior->FD && "Only storage fields have tail
                    padding!"' failed.
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangbugs at nondot.org
          Reporter: shlei930 at gmail.com
                CC: llvm-bugs at lists.llvm.org

$ clang-trunk -v
clang version 7.0.0 (trunk 328089)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin

$ clang-trunk abc.c
clang-7.0:
/home/suhua/compilers/trunk/llvm/tools/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp:594:
void {anonymous}::CGRecordLowering::clipTailPadding(): Assertion `Prior->Kind
== MemberInfo::Field && !Prior->FD && "Only storage fields have tail padding!"'
failed.
#0 0x000000000234769a llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/home/suhua/compilers/trunk/root-clang/bin/clang-7.0+0x234769a)
#1 0x000000000234570e llvm::sys::RunSignalHandlers()
(/home/suhua/compilers/trunk/root-clang/bin/clang-7.0+0x234570e)
#2 0x0000000002345872 SignalHandler(int)
(/home/suhua/compilers/trunk/root-clang/bin/clang-7.0+0x2345872)
#3 0x00007f28c6efb390 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)
#4 0x00007f28c5c6b428 gsignal
/build/glibc-Cl5G7W/glibc-2.23/signal/../sysdeps/unix/sysv/linux/raise.c:54:0
#5 0x00007f28c5c6d02a abort /build/glibc-Cl5G7W/glibc-2.23/stdlib/abort.c:91:0
#6 0x00007f28c5c63bd7 __assert_fail_base
/build/glibc-Cl5G7W/glibc-2.23/assert/assert.c:92:0
#7 0x00007f28c5c63c82 (/lib/x86_64-linux-gnu/libc.so.6+0x2dc82)
#8 0x000000000251ca17 (anonymous namespace)::CGRecordLowering::lower(bool)
(/home/suhua/compilers/trunk/root-clang/bin/clang-7.0+0x251ca17)
#9 0x000000000251cd4c
clang::CodeGen::CodeGenTypes::ComputeRecordLayout(clang::RecordDecl const*,
llvm::StructType*)
(/home/suhua/compilers/trunk/root-clang/bin/clang-7.0+0x251cd4c)
#10 0x00000000025ca0b6
clang::CodeGen::CodeGenTypes::ConvertRecordDeclType(clang::RecordDecl const*)
(/home/suhua/compilers/trunk/root-clang/bin/clang-7.0+0x25ca0b6)
#11 0x00000000025cb48b
clang::CodeGen::CodeGenTypes::getCGRecordLayout(clang::RecordDecl const*)
(/home/suhua/compilers/trunk/root-clang/bin/clang-7.0+0x25cb48b)
#12 0x00000000025cb529
clang::CodeGen::CodeGenTypes::isZeroInitializable(clang::RecordDecl const*)
(/home/suhua/compilers/trunk/root-clang/bin/clang-7.0+0x25cb529)
#13 0x000000000250d02a
clang::CodeGen::CodeGenModule::EmitNullConstant(clang::QualType)
(/home/suhua/compilers/trunk/root-clang/bin/clang-7.0+0x250d02a)
#14 0x000000000259035e
clang::CodeGen::CodeGenModule::EmitGlobalVarDefinition(clang::VarDecl const*,
bool) (/home/suhua/compilers/trunk/root-clang/bin/clang-7.0+0x259035e)
#15 0x00000000025942f4
clang::CodeGen::CodeGenModule::EmitTentativeDefinition(clang::VarDecl const*)
(/home/suhua/compilers/trunk/root-clang/bin/clang-7.0+0x25942f4)
#16 0x0000000003427a1b clang::Sema::ActOnEndOfTranslationUnit()
(/home/suhua/compilers/trunk/root-clang/bin/clang-7.0+0x3427a1b)
#17 0x000000000324e0eb
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&)
(/home/suhua/compilers/trunk/root-clang/bin/clang-7.0+0x324e0eb)
#18 0x000000000324607b clang::ParseAST(clang::Sema&, bool, bool)
(/home/suhua/compilers/trunk/root-clang/bin/clang-7.0+0x324607b)
#19 0x0000000002d46ebf clang::CodeGenAction::ExecuteAction()
(/home/suhua/compilers/trunk/root-clang/bin/clang-7.0+0x2d46ebf)
#20 0x00000000028d5816 clang::FrontendAction::Execute()
(/home/suhua/compilers/trunk/root-clang/bin/clang-7.0+0x28d5816)
#21 0x00000000028aad5e
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/home/suhua/compilers/trunk/root-clang/bin/clang-7.0+0x28aad5e)
#22 0x000000000296912e
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/home/suhua/compilers/trunk/root-clang/bin/clang-7.0+0x296912e)
#23 0x0000000000c9b1c8 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/home/suhua/compilers/trunk/root-clang/bin/clang-7.0+0xc9b1c8)
#24 0x0000000000c1eefd main
(/home/suhua/compilers/trunk/root-clang/bin/clang-7.0+0xc1eefd)
#25 0x00007f28c5c56830 __libc_start_main
/build/glibc-Cl5G7W/glibc-2.23/csu/../csu/libc-start.c:325:0
#26 0x0000000000c95e79 _start
(/home/suhua/compilers/trunk/root-clang/bin/clang-7.0+0xc95e79)
Stack dump:
0.      Program arguments: /home/suhua/compilers/trunk/root-clang/bin/clang-7.0
-cc1 -triple x86_64-unknown-linux-gnu -emit-obj -mrelax-all -disable-free
-main-file-name abc.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
/home/suhua/compilers/trunk/root-clang/lib/clang/7.0.0 -c-isystem . -c-isystem
/usr/local/include/csmith-2.3.0/ -c-isystem
/home/suhua/disk/home/klee/include/klee -internal-isystem /usr/local/include
-internal-isystem
/home/suhua/compilers/trunk/root-clang/lib/clang/7.0.0/include
-internal-externc-isystem /usr/include/x86_64-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include
-fdebug-compilation-dir /home/suhua/Documents/VPT/reduce/bug37 -ferror-limit 19
-fmessage-length 226 -fobjc-runtime=gcc -fdiagnostics-show-option
-fcolor-diagnostics -o /tmp/abc-017c29.o -x c abc.c
1.      <eof> parser at end of file
clang-7.0: error: unable to execute command: Aborted
clang-7.0: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 7.0.0 (trunk 328089)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin
clang-7.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-7.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-7.0: note: diagnostic msg: /tmp/abc-ad767a.c
clang-7.0: note: diagnostic msg: /tmp/abc-ad767a.sh
clang-7.0: note: diagnostic msg:

$ cat abc.c
struct {
  char a3[1200000000000000000];
  char a4[1200000000000000000];
} a;

-- 
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/20180411/1ed8ef5b/attachment-0001.html>


More information about the llvm-bugs mailing list