Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

clang-3.8.1 segfault on Mountain Lion during preprocessing in RemoveDuplicates #30173

Open Quuxplusone opened 8 years ago

Quuxplusone commented 8 years ago
Bugzilla Link PR31200
Status NEW
Importance P normal
Reported by Jeremy Huddleston Sequoia (jeremyhu@apple.com)
Reported on 2016-11-29 01:09:17 -0800
Last modified on 2016-11-29 01:09:17 -0800
Version 3.8
Hardware PC All
CC llvm-bugs@lists.llvm.org
Fixed by commit(s)
Attachments CMakeCCompilerId.c (16826 bytes, application/octet-stream)
Blocks
Blocked by
See also
Created attachment 17682
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
http://llvm.org/bugs/ 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).
Quuxplusone commented 8 years ago

Attached CMakeCCompilerId.c (16826 bytes, application/octet-stream): CMakeCCompilerId.c