<html>
    <head>
      <base href="https://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 --- - clang-3.8.1 segfault on Mountain Lion during preprocessing in RemoveDuplicates"
   href="https://llvm.org/bugs/show_bug.cgi?id=31200">31200</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang-3.8.1 segfault on Mountain Lion during preprocessing in RemoveDuplicates
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>3.8
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>All
          </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>jeremyhu@apple.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=17682" name="attach_17682" title="CMakeCCompilerId.c">attachment 17682</a> <a href="attachment.cgi?id=17682&action=edit" title="CMakeCCompilerId.c">[details]</a></span>
CMakeCCompilerId.c

cmake based projects are failing to compile using clang 3.8.1 on Mountain Lion
(newer versions aren't currently building on Mountain Lion, so I'm not sure if
this is fixed).  In comparison, clang 3.7.1 works fine.

As this fails during preprocessing, I cannot provide preprocessed source.

This issue does not occur with clang-3.8.1 on Sierra with the same input

$ clang-mp-3.7 --version
clang version 3.7.1 (tags/RELEASE_371/final)
Target: x86_64-apple-darwin12.6.0
Thread model: posix

$ clang-mp-3.8 --version
clang version 3.8.1 (tags/RELEASE_381/final)
Target: x86_64-apple-darwin12.6.0
Thread model: posix
InstalledDir: /opt/local/libexec/llvm-3.8/bin

$ clang-mp-3.7 -E CMakeCCompilerId.c -o /tmp/CMakeCCompilerId.pp.c

$ clang-mp-3.8 -E CMakeCCompilerId.c -o /tmp/CMakeCCompilerId.pp.c
0  libLLVM.dylib     0x00000001057bd2ec
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 43
1  libLLVM.dylib     0x00000001057bcba3 llvm::sys::RunSignalHandlers() + 44
2  libLLVM.dylib     0x00000001057bd6c8 SignalHandler(int) + 153
3  libsystem_c.dylib 0x00007fff87a0690a _sigtramp + 26
4  libsystem_c.dylib 0x0000000000000002 _sigtramp + 2019530514
5  libLLVM.dylib     0x0000000105785847
llvm::SmallPtrSetImplBase::insert_imp(void const*) + 133
6  clang             0x000000010473384e
llvm::SmallPtrSetImpl<clang::DirectoryEntry
const*>::insert(clang::DirectoryEntry const*) + 24
7  clang             0x000000010473322e
RemoveDuplicates(std::__1::vector<clang::DirectoryLookup,
std::__1::allocator<clang::DirectoryLookup> >&, unsigned int, bool) + 309
8  clang             0x0000000104731c49
clang::ApplyHeaderSearchOptions(clang::HeaderSearch&,
clang::HeaderSearchOptions const&, clang::LangOptions const&, llvm::Triple
const&) + 4821
9  clang             0x00000001046fa800
clang::CompilerInstance::createPreprocessor(clang::TranslationUnitKind) + 1456
10 clang             0x0000000104726d19
clang::FrontendAction::BeginSourceFile(clang::CompilerInstance&,
clang::FrontendInputFile const&) + 2365
11 clang             0x00000001046fd013
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 599
12 clang             0x000000010474fba1
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 3273
13 clang             0x00000001044a0685 cc1_main(llvm::ArrayRef<char const*>,
char const*, void*) + 1243
14 clang             0x000000010449f942 main + 8084
15 libdyld.dylib     0x00007fff864127e1 start + 0
16 libdyld.dylib     0x000000000000002f start + 2042550350
Stack dump:
0.    Program arguments: /opt/local/libexec/llvm-3.8/bin/clang -cc1 -triple
x86_64-apple-macosx10.8.0 -Wdeprecated-objc-isa-usage
-Werror=deprecated-objc-isa-usage -E -disable-free -disable-llvm-verifier
-main-file-name CMakeCCompilerId.c -mrelocation-model pic -pic-level 2
-mthread-model posix -mdisable-fp-elim -masm-verbose -munwind-tables
-target-cpu core2 -target-linker-version 264.3.102 -dwarf-column-info
-debugger-tuning=lldb -resource-dir
/opt/local/libexec/llvm-3.8/bin/../lib/clang/3.8.1 -fdebug-compilation-dir
/Users/jeremy/src/macports/dports/www/webkit2-gtk-devel/work/build/CMakeFiles/3.7.0/CompilerIdC
-ferror-limit 19 -fmessage-length 233 -stack-protector 1 -fblocks
-fobjc-runtime=macosx-10.8.0 -fencode-extended-block-signature
-fmax-type-align=16 -fdiagnostics-show-option -fcolor-diagnostics -o
/tmp/CMakeCCompilerId.pp.c -x c CMakeCCompilerId.c 
clang: error: unable to execute command: Segmentation fault: 11
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.8.1 (tags/RELEASE_381/final)
Target: x86_64-apple-darwin12.6.0
Thread model: posix
InstalledDir: /opt/local/libexec/llvm-3.8/bin
clang: note: diagnostic msg: PLEASE submit a bug report to
<a href="http://llvm.org/bugs/">http://llvm.org/bugs/</a> and include the crash backtrace, preprocessed source, and
associated run script.
clang: error: unable to execute command: Segmentation fault: 11
clang: note: diagnostic msg: Error generating preprocessed source(s).</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>