<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </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 - segfault while compiling libobjc2"
   href="https://bugs.llvm.org/show_bug.cgi?id=32393">32393</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>segfault while compiling libobjc2
          </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>enhancement
          </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>andreas@fink.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=18154" name="attach_18154" title="source files">attachment 18154</a> <a href="attachment.cgi?id=18154&action=edit" title="source files">[details]</a></span>
source files

Crash while compiling libobjc2 runtime of Gnustep with latest clang from trunk
repository for Debian 8

Was following these instructions:
<a href="https://github.com/andreasfink/ulib/blob/master/doc/README-LINUX.txt">https://github.com/andreasfink/ulib/blob/master/doc/README-LINUX.txt</a>

which used to work on many other debian 8 VM's before
This is on a clean fresh install of a VM. So either gnustep's code or clangs
code changed in the meantime creating a segfault

this throws a stacktrace

#0 0x00007f20fcbb931a llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/usr/lib/x86_64-linux-gnu/libLLVM-5.0.so.1+0x85e31a)
#1 0x00007f20fcbb76ae llvm::sys::RunSignalHandlers()
(/usr/lib/x86_64-linux-gnu/libLLVM-5.0.so.1+0x85c6ae)
#2 0x00007f20fcbb77ea (/usr/lib/x86_64-linux-gnu/libLLVM-5.0.so.1+0x85c7ea)
#3 0x00007f20ff51f890 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0xf890)
#4 0x00000000018155d7 clang::Decl::getTranslationUnitDecl()
(/usr/lib/llvm-5.0/bin/clang+0x18155d7)
#5 0x0000000001815619 clang::Decl::getASTContext() const
(/usr/lib/llvm-5.0/bin/clang+0x1815619)
#6 0x0000000001808e4c clang::RecordDecl::mayInsertExtraPadding(bool) const
(/usr/lib/llvm-5.0/bin/clang+0x1808e4c)
#7 0x00000000018d991d (/usr/lib/llvm-5.0/bin/clang+0x18d991d)
#8 0x00000000018d50fe clang::ASTContext::getASTRecordLayout(clang::RecordDecl
const*) const (/usr/lib/llvm-5.0/bin/clang+0x18d50fe)
#9 0x0000000001767948 (/usr/lib/llvm-5.0/bin/clang+0x1767948)
#10 0x000000000178844b
clang::ASTContext::getObjCEncodingForTypeImpl(clang::QualType, std::string&,
bool, bool, clang::FieldDecl const*, bool, bool, bool, bool, bool, bool,
clang::QualType*) const (/usr/lib/llvm-5.0/bin/clang+0x178844b)
#11 0x000000000178a075
clang::ASTContext::getObjCEncodingForType(clang::QualType, std::string&,
clang::FieldDecl const*, clang::QualType*) const
(/usr/lib/llvm-5.0/bin/clang+0x178a075)
#12 0x00000000009eb86a (/usr/lib/llvm-5.0/bin/clang+0x9eb86a)
#13 0x00000000008c24ee (/usr/lib/llvm-5.0/bin/clang+0x8c24ee)
#14 0x0000000000c87423 (/usr/lib/llvm-5.0/bin/clang+0xc87423)
#15 0x0000000000c7f971 (/usr/lib/llvm-5.0/bin/clang+0xc7f971)
#16 0x0000000000dba28e clang::ParseAST(clang::Sema&, bool, bool)
(/usr/lib/llvm-5.0/bin/clang+0xdba28e)
#17 0x0000000000c8557f clang::CodeGenAction::ExecuteAction()
(/usr/lib/llvm-5.0/bin/clang+0xc8557f)
#18 0x0000000000b5521e clang::FrontendAction::Execute()
(/usr/lib/llvm-5.0/bin/clang+0xb5521e)
#19 0x0000000000b2c5be
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/usr/lib/llvm-5.0/bin/clang+0xb2c5be)
#20 0x0000000000bdbd73
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/usr/lib/llvm-5.0/bin/clang+0xbdbd73)
#21 0x00000000007ed7c8 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/usr/lib/llvm-5.0/bin/clang+0x7ed7c8)
#22 0x00000000007dd0ff main (/usr/lib/llvm-5.0/bin/clang+0x7dd0ff)
#23 0x00007f20fb56ab45 __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x21b45)
#24 0x00000000007eb5b3 _start (/usr/lib/llvm-5.0/bin/clang+0x7eb5b3)
Stack dump:
0.      Program arguments: /usr/lib/llvm-5.0/bin/clang -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -disable-free -disable-llvm-verifier
-discard-value-names -main-file-name zeroSizedIVar.m -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 -debugger-tuning=gdb -coverage-notes-file
/root/gnustep/libobjc2/Build/Test/CMakeFiles/zeroSizedIVar_optimised.dir/zeroSizedIVar.m.gcno
-D GC_DEBUG -D GNUSTEP -D NO_LEGACY -D TYPE_DEPENDENT_DISPATCH -D
__OBJC_RUNTIME_INTERNAL__=1 -U NDEBUG -O3 -std=gnu99 -ferror-limit 19
-fmessage-length 142 -fblocks -fobjc-runtime=gnustep-1.7
-fobjc-dispatch-method=non-legacy -fobjc-exceptions -fexceptions
-fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp
-x objective-c zeroSizedIVar-d413d5.m
1.      /root/gnustep/libobjc2/Test/zeroSizedIVar.m:27:1: current parser token
'@'
2.      /root/gnustep/libobjc2/Test/zeroSizedIVar.m:25:17: LLVM IR generation
of declaration 'BitfieldTest'
/tmp/zeroSizedIVar-d413d5.sh: line 4: 19590 Segmentation fault     
"/usr/lib/llvm-5.0/bin/clang" "-cc1" "-triple" "x86_64-unknown-linux-gnu"
"-emit-obj" "-disable-free" "-disable-llvm-verifier" "-discard-value-names"
"-main-file-name" "zeroSizedIVar.m" "-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" "-debugger-tuning=gdb"
"-coverage-notes-file"
"/root/gnustep/libobjc2/Build/Test/CMakeFiles/zeroSizedIVar_optimised.dir/zeroSizedIVar.m.gcno"
"-D" "GC_DEBUG" "-D" "GNUSTEP" "-D" "NO_LEGACY" "-D" "TYPE_DEPENDENT_DISPATCH"
"-D" "__OBJC_RUNTIME_INTERNAL__=1" "-U" "NDEBUG" "-O3" "-std=gnu99"
"-ferror-limit" "19" "-fmessage-length" "142" "-fblocks"
"-fobjc-runtime=gnustep-1.7" "-fobjc-dispatch-method=non-legacy"
"-fobjc-exceptions" "-fexceptions" "-fdiagnostics-show-option"
"-fcolor-diagnostics" "-vectorize-loops" "-vectorize-slp" "-x" "objective-c"
"zeroSizedIVar-d413d5.m"</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>