[llvm-bugs] [Bug 34389] New: crash at -O1 and above in both 32-bit and 64-bit modes on x86_64-linux-gnu (Assertion `!V->hasBrokenDebugInfo() && "Module contains invalid debug info"' failed.)

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Aug 30 15:30:45 PDT 2017


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

            Bug ID: 34389
           Summary: crash at -O1 and above in both 32-bit and 64-bit modes
                    on x86_64-linux-gnu (Assertion
                    `!V->hasBrokenDebugInfo() && "Module contains invalid
                    debug info"' failed.)
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: chengniansun at gmail.com
                CC: llvm-bugs at lists.llvm.org

This might be a dup. 

$ clang-trunk -v
clang version 6.0.0 (trunk 312167)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin
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.2
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9.4
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/lib/gcc/x86_64-linux-gnu/4.8
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64
$ 
$ clang-trunk -O3 -mllvm -polly -g small.c
fragment covers entire variable
!0 = !DIGlobalVariableExpression(var: !1, expr:
!DIExpression(DW_OP_LLVM_fragment, 0, 32))
!1 = distinct !DIGlobalVariable(name: "a", scope: !2, file: !3, line: 3, type:
!7, isLocal: true, isDefinition: true)
clang-6.0: /tmp/llvm-builder/llvm-source-trunk/lib/IR/Verifier.cpp:4702:
virtual bool {anonymous}::VerifierLegacyPass::doFinalization(llvm::Module&):
Assertion `!V->hasBrokenDebugInfo() && "Module contains invalid debug info"'
failed.
#0 0x00000000021283ea llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/usr/local/clang-trunk/bin/clang-6.0+0x21283ea)
#1 0x000000000212649e llvm::sys::RunSignalHandlers()
(/usr/local/clang-trunk/bin/clang-6.0+0x212649e)
#2 0x0000000002126602 SignalHandler(int)
(/usr/local/clang-trunk/bin/clang-6.0+0x2126602)
#3 0x00007fa1ef272330 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x10330)
#4 0x00007fa1ee060c37 gsignal
/build/eglibc-MjiXCM/eglibc-2.19/signal/../nptl/sysdeps/unix/sysv/linux/raise.c:56:0
#5 0x00007fa1ee064028 abort
/build/eglibc-MjiXCM/eglibc-2.19/stdlib/abort.c:91:0
#6 0x00007fa1ee059bf6 __assert_fail_base
/build/eglibc-MjiXCM/eglibc-2.19/assert/assert.c:92:0
#7 0x00007fa1ee059ca2 (/lib/x86_64-linux-gnu/libc.so.6+0x2fca2)
#8 0x0000000001d3b1f2 (anonymous
namespace)::VerifierLegacyPass::doFinalization(llvm::Module&)
(/usr/local/clang-trunk/bin/clang-6.0+0x1d3b1f2)
#9 0x0000000001cda7cb llvm::FPPassManager::doFinalization(llvm::Module&)
(/usr/local/clang-trunk/bin/clang-6.0+0x1cda7cb)
#10 0x0000000001ce5717 llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/usr/local/clang-trunk/bin/clang-6.0+0x1ce5717)
#11 0x00000000022b2bae (anonymous
namespace)::EmitAssemblyHelper::EmitAssembly(clang::BackendAction,
std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >)
(/usr/local/clang-trunk/bin/clang-6.0+0x22b2bae)
#12 0x00000000022b3e8f clang::EmitBackendOutput(clang::DiagnosticsEngine&,
clang::HeaderSearchOptions const&, clang::CodeGenOptions const&,
clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout
const&, llvm::Module*, clang::BackendAction,
std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >)
(/usr/local/clang-trunk/bin/clang-6.0+0x22b3e8f)
#13 0x0000000002a89e7b
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/usr/local/clang-trunk/bin/clang-6.0+0x2a89e7b)
#14 0x0000000002ca75c2 clang::ParseAST(clang::Sema&, bool, bool)
(/usr/local/clang-trunk/bin/clang-6.0+0x2ca75c2)
#15 0x0000000002a8951f clang::CodeGenAction::ExecuteAction()
(/usr/local/clang-trunk/bin/clang-6.0+0x2a8951f)
#16 0x0000000002649ce6 clang::FrontendAction::Execute()
(/usr/local/clang-trunk/bin/clang-6.0+0x2649ce6)
#17 0x00000000026216de
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/usr/local/clang-trunk/bin/clang-6.0+0x26216de)
#18 0x00000000026d852b
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/usr/local/clang-trunk/bin/clang-6.0+0x26d852b)
#19 0x0000000000c1fa68 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/usr/local/clang-trunk/bin/clang-6.0+0xc1fa68)
#20 0x0000000000bacebf main (/usr/local/clang-trunk/bin/clang-6.0+0xbacebf)
#21 0x00007fa1ee04bf45 __libc_start_main
/build/eglibc-MjiXCM/eglibc-2.19/csu/libc-start.c:321:0
#22 0x0000000000c1b089 _start (/usr/local/clang-trunk/bin/clang-6.0+0xc1b089)
Stack dump:
0.      Program arguments: /usr/local/clang-trunk/bin/clang-6.0 -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name small.c
-mrelocation-model static -mthread-model posix -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64
-momit-leaf-frame-pointer -dwarf-column-info -debug-info-kind=limited
-dwarf-version=4 -debugger-tuning=gdb -resource-dir
/usr/local/clang-trunk/lib/clang/6.0.0 -c-isystem
/usr/local/include/csmith-2.2.0/ -c-isystem /usr/local/include/csmith-2.2.0/
-internal-isystem /usr/local/include -internal-isystem
/usr/local/clang-trunk/lib/clang/6.0.0/include -internal-externc-isystem
/usr/include/x86_64-linux-gnu -internal-externc-isystem /include
-internal-externc-isystem /usr/include -O3 -fdebug-compilation-dir
/home/cnsun/ramdisk/hermes/run-3/res/20170830-clang-trunk-m32-Weverything-g-O3-mllvm-enable-newgvn-mllvm-polly-build-144928/delta
-ferror-limit 19 -fmessage-length 238 -fobjc-runtime=gcc
-fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp
-mllvm -polly -o /tmp/small-9d2067.o -x c small.c 
1.      <eof> parser at end of file
2.      Code generation
clang-6.0: error: unable to execute command: Aborted (core dumped)
clang-6.0: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 6.0.0 (trunk 312167)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/local/bin
clang-6.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-6.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-6.0: note: diagnostic msg: /tmp/small-1cf070.c
clang-6.0: note: diagnostic msg: /tmp/small-1cf070.sh
clang-6.0: note: diagnostic msg: 

********************
$ 
$ cat small.c
struct {
  int f0;
} static a;
int main() {
  a.f0++;
  return 0;
}
$

-- 
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/20170830/9a0de46f/attachment-0001.html>


More information about the llvm-bugs mailing list