<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Crash in llvm::DIEEntry::EmitValue in r183914"
   href="http://llvm.org/bugs/show_bug.cgi?id=16544">16544</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Crash in llvm::DIEEntry::EmitValue in r183914
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>-New Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>chris@cooperteam.net
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I've got some code that causes clang to die with SIGSEGV when building.

This is using the Debian clang-3.4 packages, which are built from SVN r183914

Backtrace is: 

0 libLLVM-3.4.so.1 0x00002aaaabb293a2 llvm::sys::PrintStackTrace(_IO_FILE*) +
34
1 libLLVM-3.4.so.1 0x00002aaaabb29209
2 libpthread.so.0 0x00002aaaac39bbd0
3 libLLVM-3.4.so.1 0x00002aaaab2b4d6a
llvm::DIEEntry::EmitValue(llvm::AsmPrinter*, unsigned int) const + 10
4 libLLVM-3.4.so.1 0x00002aaaab2c63e0 llvm::DwarfDebug::emitDIE(llvm::DIE*,
std::vector<llvm::DIEAbbrev*, std::allocator<llvm::DIEAbbrev*> >*) + 592
5 libLLVM-3.4.so.1 0x00002aaaab2c6579 llvm::DwarfDebug::emitDIE(llvm::DIE*,
std::vector<llvm::DIEAbbrev*, std::allocator<llvm::DIEAbbrev*> >*) + 1001
6 libLLVM-3.4.so.1 0x00002aaaab2c6579 llvm::DwarfDebug::emitDIE(llvm::DIE*,
std::vector<llvm::DIEAbbrev*, std::allocator<llvm::DIEAbbrev*> >*) + 1001
7 libLLVM-3.4.so.1 0x00002aaaab2c6579 llvm::DwarfDebug::emitDIE(llvm::DIE*,
std::vector<llvm::DIEAbbrev*, std::allocator<llvm::DIEAbbrev*> >*) + 1001
8 libLLVM-3.4.so.1 0x00002aaaab2c6579 llvm::DwarfDebug::emitDIE(llvm::DIE*,
std::vector<llvm::DIEAbbrev*, std::allocator<llvm::DIEAbbrev*> >*) + 1001
9 libLLVM-3.4.so.1 0x00002aaaab2c6579 llvm::DwarfDebug::emitDIE(llvm::DIE*,
std::vector<llvm::DIEAbbrev*, std::allocator<llvm::DIEAbbrev*> >*) + 1001
10 libLLVM-3.4.so.1 0x00002aaaab2c6a26
llvm::DwarfUnits::emitUnits(llvm::DwarfDebug*, llvm::MCSection const*,
llvm::MCSection const*, llvm::MCSymbol const*) + 518
11 libLLVM-3.4.so.1 0x00002aaaab2cffe2 llvm::DwarfDebug::endModule() + 546
12 libLLVM-3.4.so.1 0x00002aaaab2af010
llvm::AsmPrinter::doFinalization(llvm::Module&) + 496
13 libLLVM-3.4.so.1 0x00002aaaab54ec85
llvm::FPPassManager::doFinalization(llvm::Module&) + 69
14 libLLVM-3.4.so.1 0x00002aaaab555475
llvm::MPPassManager::runOnModule(llvm::Module&) + 613
15 libLLVM-3.4.so.1 0x00002aaaab55757c
llvm::PassManagerImpl::run(llvm::Module&) + 172
16 clang 0x000000000078fedc clang::EmitBackendOutput(clang::DiagnosticsEngine&,
clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions
const&, llvm::Module*, clang::BackendAction, llvm::raw_ostream*) + 2220
17 clang 0x000000000078de97
18 clang 0x00000000008e0edb clang::ParseAST(clang::Sema&, bool, bool) + 507
19 clang 0x0000000000645699 clang::FrontendAction::Execute() + 169
20 clang 0x0000000000626ca2
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 290
21 clang 0x0000000000612907
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1607
22 clang 0x000000000060dcb8 cc1_main(char const**, char const**, char const*,
void*) + 1224
23 clang 0x000000000060c6be main + 7822
24 libc.so.6 0x00002aaaacae4ea5 __libc_start_main + 245
25 clang 0x000000000060ccb5
Stack dump:
0.    Program arguments: /usr/bin/clang -cc1 -triple x86_64-pc-linux-gnu
-emit-obj -disable-free -disable-llvm-verifier -main-file-name
test_surfaceloop.cpp -mrelocation-model pic -pic-level 2 -relaxed-aliasing
-fmath-errno -masm-verbose -mconstructor-aliases -munwind-tables
-fuse-init-array -target-cpu x86-64 -target-linker-version 2.23.52.20130620
-momit-leaf-frame-pointer -g -coverage-file
/home/chris/Canonical/Mir/mir/build/tests/integration-tests/CMakeFiles/integration-tests.dir/test_surfaceloop.cpp.o
-resource-dir /usr/bin/../lib/clang/3.4 -include
/home/chris/Canonical/Mir/mir/udev-wrapper/3rd_party/android-input/android/system/core/include/arch/ubuntu-x86/AndroidConfig.h
-D ANDROID_USE_STD -D __GBM__ -D NDEBUG -D USING_STD_CPP11 -I
/home/chris/Canonical/Mir/mir/udev-wrapper/include/shared -I
/home/chris/Canonical/Mir/mir/udev-wrapper/3rd_party/libancillary -I
/home/chris/Canonical/Mir/mir/udev-wrapper/3rd_party/android-deps -I
/home/chris/Canonical/Mir/mir/udev-wrapper/3rd_party/android-input/android/frameworks/base/services/input
-I
/home/chris/Canonical/Mir/mir/udev-wrapper/3rd_party/android-input/android/frameworks/base/include
-I
/home/chris/Canonical/Mir/mir/udev-wrapper/3rd_party/android-input/android/frameworks/native/include
-I
/home/chris/Canonical/Mir/mir/udev-wrapper/3rd_party/android-input/android/hardware/libhardware_legacy/include
-I
/home/chris/Canonical/Mir/mir/udev-wrapper/3rd_party/android-input/android/system/core/include
-I
/home/chris/Canonical/Mir/mir/udev-wrapper/3rd_party/android-input/android/system/extras/ext4_utils
-I
/home/chris/Canonical/Mir/mir/udev-wrapper/3rd_party/android-input/android/external/kernel-headers/original
-I /home/chris/Canonical/Mir/mir/build/src/shared/protobuf -I
/home/chris/Canonical/Mir/mir/udev-wrapper/3rd_party/gmock/include -I
/home/chris/Canonical/Mir/mir/udev-wrapper/3rd_party/gmock/gtest/include -I
/home/chris/Canonical/Mir/mir/udev-wrapper/include/server -I
/home/chris/Canonical/Mir/mir/udev-wrapper/include/client -I
/home/chris/Canonical/Mir/mir/udev-wrapper/include/test -I
/home/chris/Canonical/Mir/mir/udev-wrapper -I /usr/include/libdrm
-internal-isystem /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/x86_64-linux-gnu
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/c++/4.8/backward
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../include/x86_64-linux-gnu/c++/4.8
-internal-isystem /usr/local/include -internal-isystem
/usr/bin/../lib/clang/3.4/include -internal-isystem
/usr/include/clang/3.4/include/ -internal-externc-isystem
/usr/include/x86_64-linux-gnu -internal-externc-isystem
/usr/include/x86_64-linux-gnu -internal-externc-isystem /usr/include -O2
-Werror -Wall -Wnon-virtual-dtor -Wextra -Wno-return-type-c-linkage
-Wno-error=null-dereference -Wno-error=overloaded-virtual -pedantic -std=c++0x
-fdeprecated-macro -fdebug-compilation-dir
/home/chris/Canonical/Mir/mir/build/tests/integration-tests -ferror-limit 19
-fmessage-length 170 -mstackrealign -fobjc-runtime=gcc
-fobjc-default-synthesize-properties -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -fcolor-diagnostics -backend-option -vectorize-loops
-o CMakeFiles/integration-tests.dir/test_surfaceloop.cpp.o -x c++
/home/chris/Canonical/Mir/mir/udev-wrapper/tests/integration-tests/test_surfaceloop.cpp
1.    <eof> parser at end of file
2.    Code generation
clang: error: unable to execute command: Segmentation fault (core dumped)
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
Ubuntu clang version 3.4-1 (trunk) (based on LLVM 3.4)
Target: x86_64-pc-linux-gnu
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to
<a href="http://bugs.debian.org/">http://bugs.debian.org/</a> and include the crash backtrace, preprocessed source,
and associated run script.
clang: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/test_surfaceloop-uLqs4n.cpp
clang: note: diagnostic msg: /tmp/test_surfaceloop-uLqs4n.sh
clang: note: diagnostic msg:

********************

Pre-processed source can be found here:
<a href="https://bugs.launchpad.net/ubuntu/+source/llvm-toolchain-snapshot/+bug/1198068/+attachment/3725451/+files/test_surfaceloop-uLqs4n.cpp">https://bugs.launchpad.net/ubuntu/+source/llvm-toolchain-snapshot/+bug/1198068/+attachment/3725451/+files/test_surfaceloop-uLqs4n.cpp</a>

And run script here:
<a href="https://bugs.launchpad.net/ubuntu/+source/llvm-toolchain-snapshot/+bug/1198068/+attachment/3725478/+files/test_surfaceloop-uLqs4n.sh">https://bugs.launchpad.net/ubuntu/+source/llvm-toolchain-snapshot/+bug/1198068/+attachment/3725478/+files/test_surfaceloop-uLqs4n.sh</a></pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>