Clang static analyzer crash

Originator:guillaume.algis
Number:rdar://51330803 Date Originated:2019-06-01
Status:Open Resolved:
Product:Developer Tools / Xcode Product Version:10.2.1 (10E1001)
Classification:Crash/Hang/Data Loss Reproducible:Always
 
Summary:
When running Clang's static analyzer on my project https://github.com/ipsosante/ISHolidays, it will crash reliably.

The static analyzer is launched through Xcode's UI.
Please note that I intentionally enable a lot of warnings / static analyzer flags in a custom .xcconfig file : https://github.com/ipsosante/ISHolidays/blob/static-analyzer-crash/ISHolidays/ISHolidays.xcconfig

Here are the logs I get in Xcode :

clang: error: unable to execute command: Segmentation fault: 11
clang: error: clang frontend command failed due to signal (use -v to see invocation)
Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Target: x86_64-apple-darwin18.6.0-simulator
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
clang: note: diagnostic msg: PLEASE submit a bug report to http://developer.apple.com/bugreporter/ 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: /var/folders/5s/z36ch40x4pd_8wnykvhsgt3m0000gn/T/ISHolidays-ae3a7f.m
clang: note: diagnostic msg: /var/folders/5s/z36ch40x4pd_8wnykvhsgt3m0000gn/T/ISHolidays-ae3a7f.cache
clang: note: diagnostic msg: /var/folders/5s/z36ch40x4pd_8wnykvhsgt3m0000gn/T/ISHolidays-ae3a7f.sh
clang: note: diagnostic msg: /var/folders/5s/z36ch40x4pd_8wnykvhsgt3m0000gn/T/ISHolidays-ae3a7f.crash
clang: note: diagnostic msg: 

********************
Command AnalyzeShallow failed with a nonzero exit code



Steps to Reproduce:
1. Clone the project at https://github.com/ipsosante/ISHolidays
2. Checkout the branch "static-analyzer-crash"
3. Open the project in Xcode
4. Run the "Analyze" command on the project

Expected Results:
Clang's static analyzer produces a report of the project

Actual Results:
Clang's static analyzer crashes with a segmentation fault

Version/Build:
10.2.1 (10E1001)

Attached are the files requested in the logs, and a sysdiagnose because why not.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!