New to bug reporting.. bit lost

So I’ve got a clang-17 hang on some of my code. It only shows up when I’m archiving (release build) in Xcode 16.3, the debug build seems ok. I’m not sure if it’s a front end or back end issue. But the stack trace is:

  2022 start  (in dyld) + 6000  [0x188a26b4c]
    2022 main  (in clang) + 80  [0x104f46738]
      2022 clang_main(int, char**, llvm::ToolContext const&)  (in clang) + 224  [0x104f2f8c4]
        2022 driver_main(int, char**, llvm::ToolContext const&)  (in clang) + 4000  [0x104f308c0]
          2022 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&)  (in clang) + 1140  [0x104f30e38]
            2022 cc1_main(llvm::ArrayRef<char const*>, char const*, void*)  (in clang) + 1508  [0x104f356c4]
              2022 clang::ExecuteCompilerInvocation(clang::CompilerInstance*)  (in clang) + 624  [0x104f695e8]
                2022 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)  (in clang) + 408  [0x10710c764]
                  2022 clang::FrontendAction::Execute()  (in clang) + 52  [0x107185204]
                    2022 clang::ParseAST(clang::Sema&, bool, bool)  (in clang) + 352  [0x10743ad64]
                      2022 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)  (in clang) + 1272  [0x105c46800]
                        2022 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, clang::CASOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>, std::unique_ptr<llvm::raw_pwrite_stream>, std::unique_ptr<llvm::raw_pwrite_stream>, clang::BackendConsumer*)  (in clang) + 1412  [0x105950a30]
                          2022 (anonymous namespace)::EmitAssemblyHelper::RunOptimizationPipeline(clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream>&, std::unique_ptr<llvm::ToolOutputFile>&, clang::BackendConsumer*)  (in clang) + 3372  [0x10595589c]
                            2022 llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&)  (in clang) + 428  [0x108cfacdc]
                              2022 llvm::ModuleInlinerWrapperPass::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&)  (in clang) + 544  [0x10626c264]
                                2022 llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module>>::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&)  (in clang) + 428  [0x108cfacdc]
                                  2022 llvm::ModuleToPostOrderCGSCCPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&)  (in clang) + 2232  [0x1087c5450]
                                    2022 llvm::DevirtSCCRepeatedPass::run(llvm::LazyCallGraph::SCC&, llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>&, llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&)  (in clang) + 624  [0x1087c5d84]
                                      2022 llvm::PassManager<llvm::LazyCallGraph::SCC, llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>, llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&>::run(llvm::LazyCallGraph::SCC&, llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>&, llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&)  (in clang) + 336  [0x1087c4034]
                                        2022 llvm::CGSCCToFunctionPassAdaptor::run(llvm::LazyCallGraph::SCC&, llvm::AnalysisManager<llvm::LazyCallGraph::SCC, llvm::LazyCallGraph&>&, llvm::LazyCallGraph&, llvm::CGSCCUpdateResult&)  (in clang) + 584  [0x1087c8914]
                                          2022 llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function>>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&)  (in clang) + 564  [0x108cfb918]
                                            2022 llvm::InstCombinePass::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&)  (in clang) + 668  [0x10856b30c]
                                              2022 combineInstructionsOverFunction(llvm::Function&, llvm::InstructionWorklist&, llvm::AAResults*, llvm::AssumptionCache&, llvm::TargetLibraryInfo&, llvm::TargetTransformInfo&, llvm::DominatorTree&, llvm::OptimizationRemarkEmitter&, llvm::BlockFrequencyInfo*, llvm::BranchProbabilityInfo*, llvm::ProfileSummaryInfo*, llvm::LoopInfo*, llvm::InstCombineOptions const&)  (in clang) + 4052  [0x10856c4d4]
                                                2022 llvm::isInstructionTriviallyDead(llvm::Instruction*, llvm::TargetLibraryInfo const*)  (in clang) + 4524  [0x1086967a4]
                                                  2022 llvm::isInstructionTriviallyDead(llvm::Instruction*, llvm::TargetLibraryInfo const*)  (in clang) + 1708,1696,...  [0x108695ca4,0x108695c98,...]

What is the next steps I need to take to collect enough info to reproduce the bug for the developers?

Also I CAN reproduce the hang outside Xcode using just the command line:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c++ -ivfsstatcache /Users/matthew/code/scribe/trunk_os/mac/DerivedData/SDKStatCaches.noindex/macosx15.4-24E241-88b860576fb364319593bd8fb30666b0.sdkstatcache -fmessage-length\=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit\=0 -fno-color-diagnostics -fmodules-prune-interval\=86400 -fmodules-prune-after\=345600 -fbuild-session-file\=/Users/matthew/code/scribe/trunk_os/mac/DerivedData/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror\=non-modular-include-in-framework-module -Wno-trigraphs -Wno-missing-field-initializers -Wno-missing-prototypes -Werror\=return-type -Wunreachable-code -Wquoted-include-in-framework-header -Werror\=deprecated-objc-isa-usage -Werror\=objc-root-class -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-empty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wno-newline-eof -Wno-c++11-extensions -Wno-implicit-fallthrough -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof -Wno-sign-conversion -Winfinite-recursion -Wmove -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wrange-loop-analysis -Wno-semicolon-before-method-body -Wno-nullability-completeness @/Users/matthew/code/scribe/trunk_os/mac/DerivedData/Scribe/Build/Intermediates.noindex/ArchiveIntermediates/Scribe/IntermediateBuildFilesPath/Scribe.build/Release/Scribe.build/Objects-normal/x86_64/82b82416624d2658e5098eb0a28c15c5-common-args.resp -MMD -MT dependencies -MF /Users/matthew/code/scribe/trunk_os/mac/DerivedData/Scribe/Build/Intermediates.noindex/ArchiveIntermediates/Scribe/IntermediateBuildFilesPath/Scribe.build/Release/Scribe.build/Objects-normal/x86_64/HomoglyphsTable.d --serialize-diagnostics /Users/matthew/code/scribe/trunk_os/mac/DerivedData/Scribe/Build/Intermediates.noindex/ArchiveIntermediates/Scribe/IntermediateBuildFilesPath/Scribe.build/Release/Scribe.build/Objects-normal/x86_64/HomoglyphsTable.dia -c /Users/matthew/code/Lgi/trunk/src/common/Text/Homoglyphs/HomoglyphsTable.cpp -o /Users/matthew/code/scribe/trunk_os/mac/DerivedData/Scribe/Build/Intermediates.noindex/ArchiveIntermediates/Scribe/IntermediateBuildFilesPath/Scribe.build/Release/Scribe.build/Objects-normal/x86_64/HomoglyphsTable.o

HomoglyphsTable.cpp is available from:

hg clone https://phab.mallen.id.au/source/lgi/ lgi/trunk

You can kill -s SIGSEGV `pgrep clang` to force clang to crash, so it will dump preprocessed source/compile command.

Note that we only handle bug reports for issues which can be reproduced with a unmodified llvm.org compiler; if you’re running into an issue with Apple’s fork, you’ll need to report the issue to Apple.