Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

275
Visualizações
clang crashed during compilation of .cpp in Xcode in Release mode but ok in debug

I have a project where I have a .h, .cpp, and a bridging header, so basically trying to call some c++ code from swift. When i built and ran in Debug mode, things looked fine.

If I switch to release mode, it failed to build, and the crash happened during compilation from clang. Here's the message:

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.0 (clang-1000.11.45.5)
Target: aarch64-apple-darwin17.7.0
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/r5/bs8mgc751_bbl3gcths89jc00000gp/T/CBaseMath-8e4bd0.cpp
clang: note: diagnostic msg: /var/folders/r5/bs8mgc751_bbl3gcths89jc00000gp/T/CBaseMath-8e4bd0.sh
clang: note: diagnostic msg: Crash backtrace is located in
clang: note: diagnostic msg: /Users/kelvinchan/Library/Logs/DiagnosticReports/clang_<YYYY-MM-DD-HHMMSS>_<hostname>.crash
clang: note: diagnostic msg: (choose the .crash file that corresponds to your crash)
clang: note: diagnostic msg: 

Any idea if there's something I should look, before trying to file a bug report for Apple as instructed? I tried to looked at the .crash file but i am not technical enough to understand it. It does not reference any of the c++ code I have.

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

You have a crash in your compiler, which is annoying. The best way to log a bug is to reduce this as much as possible.

The best way of doing so is with a program called Creduce. It's a program that requires a file and a script. The file is your starting situation. The script needs to prove your bug still exists.

In this case, your script could exist about the 2 compile commands and checking the return code. The file is simply your .CPP

With all of this, the program will throw away code ... and reduce the file as much as possible. I've seen 100 000 lines being reduced to 5.

A tricks: preprocessed files are larger though self-contained, this makes it easier to reduce.

Finally, you need a lot of time. You start it and it runs until it is reduced

If it runs in less than five minutes your script is faulty and you usually end up with an empty .CPP Expected time are in the range of hours.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda