[MacPorts] #65246: clang-14: crashes occurring for multiple ports (was: clang-14: crash during compilation of darktable 3.8.1)

MacPorts noreply at macports.org
Thu Jun 30 19:15:55 UTC 2022


#65246: clang-14: crashes occurring for multiple ports
-------------------------------------------------+-------------------------
  Reporter:  mascguy                             |      Owner:  (none)
      Type:  defect                              |     Status:  new
  Priority:  Normal                              |  Milestone:
 Component:  ports                               |    Version:  2.7.2
Resolution:                                      |   Keywords:
      Port:  clang-14 llvm-14 darktable          |
  darktable-devel                                |
-------------------------------------------------+-------------------------
Changes (by mascguy):

 * version:   => 2.7.2


Old description:

> When compiling `darktable` 3.8.1, the following crash occurs, for source
> file `src/common/iop_profile.c`:
>
> {{{
> 1.  <eof> parser at end of file
> 2.  Code generation
> 3.  Running pass 'Function Pass Manager' on module
> 'work/darktable-3.8.1/src/common/iop_profile.c'.
> 4.  Running pass 'Debug Variable Analysis' on function
> '@dt_ioppr_transform_image_colorspace'
> Stack dump without symbol names (ensure you have llvm-symbolizer in your
> PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
> 0  libLLVM.dylib            0x000000010a0eea8b
> llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 43
> 1  libLLVM.dylib            0x000000010a0ed928
> llvm::sys::RunSignalHandlers() + 248
> 2  libLLVM.dylib            0x000000010a0ee040
> llvm::sys::CleanupOnSignal(unsigned long) + 208
> 3  libLLVM.dylib            0x000000010a00a06f
> CrashRecoverySignalHandler(int) + 191
> 4  libsystem_platform.dylib 0x00007fff95c38b3a _sigtramp + 26
> 5  libsystem_platform.dylib 0x00007fff58ebd930 _sigtramp +
> 18446744072688782864
> 6  libLLVM.dylib            0x000000010a3e9371 (anonymous
> namespace)::LDVImpl::runOnMachineFunction(llvm::MachineFunction&, bool) +
> 5457
> 7  libLLVM.dylib            0x000000010a4ac0b4
> llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 308
> 8  libLLVM.dylib            0x000000010a24ae2a
> llvm::FPPassManager::runOnFunction(llvm::Function&) + 922
> 9  libLLVM.dylib            0x000000010a251383
> llvm::FPPassManager::runOnModule(llvm::Module&) + 67
> 10 libLLVM.dylib            0x000000010a24b449
> llvm::legacy::PassManagerImpl::run(llvm::Module&) + 937
> 11 libclang-cpp.dylib       0x0000000107db85db
> clang::EmitBackendOutput(clang::DiagnosticsEngine&,
> clang::HeaderSearchOptions const&, clang::CodeGenOptions const&,
> clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef,
> llvm::Module*, clang::BackendAction,
> std::__1::unique_ptr<llvm::raw_pwrite_stream,
> std::__1::default_delete<llvm::raw_pwrite_stream> >) + 2395
> 12 libclang-cpp.dylib       0x00000001080ecb98
> clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) + 1928
> 13 libclang-cpp.dylib       0x0000000106ebfe63
> clang::ParseAST(clang::Sema&, bool, bool) + 643
> 14 libclang-cpp.dylib       0x0000000108988dfa
> clang::FrontendAction::Execute() + 90
> 15 libclang-cpp.dylib       0x00000001088f1616
> clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 902
> 16 libclang-cpp.dylib       0x00000001089ff5f8
> clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 680
> 17 clang                    0x0000000106d42e53
> cc1_main(llvm::ArrayRef<char const*>, char const*, void*) + 2147
> 18 clang                    0x0000000106d41036
> ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) + 310
> 19 libclang-cpp.dylib       0x000000010853c707 void
> llvm::function_ref<void
> ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>
> >, std::__1::basic_string<char, std::__1::char_traits<char>,
> std::__1::allocator<char> >*, bool*) const::$_1>(long) + 23
> 20 libLLVM.dylib            0x000000010a009dc2
> llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) + 226
> 21 libclang-cpp.dylib       0x000000010853c295
> clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>
> >, std::__1::basic_string<char, std::__1::char_traits<char>,
> std::__1::allocator<char> >*, bool*) const + 389
> 22 libclang-cpp.dylib       0x000000010850314f
> clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&,
> clang::driver::Command const*&) const + 415
> 23 libclang-cpp.dylib       0x000000010850364c
> clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&,
> llvm::SmallVectorImpl<std::__1::pair<int, clang::driver::Command const*>
> >&) const + 124
> 24 libclang-cpp.dylib       0x000000010851f11c
> clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&,
> llvm::SmallVectorImpl<std::__1::pair<int, clang::driver::Command const*>
> >&) + 396
> 25 clang                    0x0000000106d409b4 main + 10820
> 26 libdyld.dylib            0x00007fff95a29235 start + 1
> 27 libdyld.dylib            0x0000000000000088 start +
> 18446603338005704276
> clang: error: clang frontend command failed with exit code 139 (use -v to
> see invocation)
> clang version 14.0.3
> Target: x86_64-apple-darwin16.7.0
> Thread model: posix
> InstalledDir: /opt/local/libexec/llvm-14/bin
> 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: work/.tmp/iop_profile-cce2b4.c
> clang: note: diagnostic msg: work/.tmp/iop_profile-cce2b4.sh
> clang: note: diagnostic msg: Crash backtrace is located in
> clang: note: diagnostic msg:
> work/.home/Library/Logs/DiagnosticReports/clang_<YYYY-MM-DD-
> HHMMSS>_<hostname>.crash
> clang: note: diagnostic msg: (choose the .crash file that corresponds to
> your crash)
> }}}
>
> Build log is attached.
>
> I can certainly attach the additional temp files, if folks are
> interested. But given that we're currently running with LLVM/Clang 14.0.3
> - and 14.0.4 was just released over the past few days - should we try
> updating to the latest release?

New description:

 When compiling `darktable` 3.8.1, the following crash occurs, for source
 file `src/common/iop_profile.c`. Build log attached.

 {{{
 1.  <eof> parser at end of file
 2.  Code generation
 3.  Running pass 'Function Pass Manager' on module
 'work/darktable-3.8.1/src/common/iop_profile.c'.
 4.  Running pass 'Debug Variable Analysis' on function
 '@dt_ioppr_transform_image_colorspace'
 Stack dump without symbol names (ensure you have llvm-symbolizer in your
 PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
 0  libLLVM.dylib            0x000000010a0eea8b
 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 43
 1  libLLVM.dylib            0x000000010a0ed928
 llvm::sys::RunSignalHandlers() + 248
 2  libLLVM.dylib            0x000000010a0ee040
 llvm::sys::CleanupOnSignal(unsigned long) + 208
 3  libLLVM.dylib            0x000000010a00a06f
 CrashRecoverySignalHandler(int) + 191
 4  libsystem_platform.dylib 0x00007fff95c38b3a _sigtramp + 26
 5  libsystem_platform.dylib 0x00007fff58ebd930 _sigtramp +
 18446744072688782864
 6  libLLVM.dylib            0x000000010a3e9371 (anonymous
 namespace)::LDVImpl::runOnMachineFunction(llvm::MachineFunction&, bool) +
 5457
 7  libLLVM.dylib            0x000000010a4ac0b4
 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 308
 8  libLLVM.dylib            0x000000010a24ae2a
 llvm::FPPassManager::runOnFunction(llvm::Function&) + 922
 9  libLLVM.dylib            0x000000010a251383
 llvm::FPPassManager::runOnModule(llvm::Module&) + 67
 10 libLLVM.dylib            0x000000010a24b449
 llvm::legacy::PassManagerImpl::run(llvm::Module&) + 937
 11 libclang-cpp.dylib       0x0000000107db85db
 clang::EmitBackendOutput(clang::DiagnosticsEngine&,
 clang::HeaderSearchOptions const&, clang::CodeGenOptions const&,
 clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef,
 llvm::Module*, clang::BackendAction,
 std::__1::unique_ptr<llvm::raw_pwrite_stream,
 std::__1::default_delete<llvm::raw_pwrite_stream> >) + 2395
 12 libclang-cpp.dylib       0x00000001080ecb98
 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) + 1928
 13 libclang-cpp.dylib       0x0000000106ebfe63
 clang::ParseAST(clang::Sema&, bool, bool) + 643
 14 libclang-cpp.dylib       0x0000000108988dfa
 clang::FrontendAction::Execute() + 90
 15 libclang-cpp.dylib       0x00000001088f1616
 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 902
 16 libclang-cpp.dylib       0x00000001089ff5f8
 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 680
 17 clang                    0x0000000106d42e53
 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) + 2147
 18 clang                    0x0000000106d41036
 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) + 310
 19 libclang-cpp.dylib       0x000000010853c707 void
 llvm::function_ref<void
 ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>
 >, std::__1::basic_string<char, std::__1::char_traits<char>,
 std::__1::allocator<char> >*, bool*) const::$_1>(long) + 23
 20 libLLVM.dylib            0x000000010a009dc2
 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) + 226
 21 libclang-cpp.dylib       0x000000010853c295
 clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>
 >, std::__1::basic_string<char, std::__1::char_traits<char>,
 std::__1::allocator<char> >*, bool*) const + 389
 22 libclang-cpp.dylib       0x000000010850314f
 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&,
 clang::driver::Command const*&) const + 415
 23 libclang-cpp.dylib       0x000000010850364c
 clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&,
 llvm::SmallVectorImpl<std::__1::pair<int, clang::driver::Command const*>
 >&) const + 124
 24 libclang-cpp.dylib       0x000000010851f11c
 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&,
 llvm::SmallVectorImpl<std::__1::pair<int, clang::driver::Command const*>
 >&) + 396
 25 clang                    0x0000000106d409b4 main + 10820
 26 libdyld.dylib            0x00007fff95a29235 start + 1
 27 libdyld.dylib            0x0000000000000088 start +
 18446603338005704276
 clang: error: clang frontend command failed with exit code 139 (use -v to
 see invocation)
 clang version 14.0.3
 Target: x86_64-apple-darwin16.7.0
 Thread model: posix
 InstalledDir: /opt/local/libexec/llvm-14/bin
 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: work/.tmp/iop_profile-cce2b4.c
 clang: note: diagnostic msg: work/.tmp/iop_profile-cce2b4.sh
 clang: note: diagnostic msg: Crash backtrace is located in
 clang: note: diagnostic msg:
 work/.home/Library/Logs/DiagnosticReports/clang_<YYYY-MM-DD-
 HHMMSS>_<hostname>.crash
 clang: note: diagnostic msg: (choose the .crash file that corresponds to
 your crash)
 }}}


 Similarly, a link-time crash occurs with `libopenraw`:

 {{{
   = note: 0  0x104026b51  __assert_rtn + 144
           1  0x104057063  ld::Fixup::Fixup(unsigned int,
 ld::Fixup::Cluster, ld::Fixup::Kind, bool, char const*) + 107
           2  0x10402f4e9
 mach_o::relocatable::Parser<x86_64>::addFixup(mach_o::relocatable::Parser<x86_64>::SourceLocation
 const&, ld::Fixup::Cluster, ld::Fixup::Kind, bool, char const*) + 33
           3  0x10402a751
 mach_o::relocatable::Section<x86_64>::addRelocFixup(mach_o::relocatable::Parser<x86_64>&,
 macho_relocation_info<Pointer64<LittleEndian> > const*) + 1471
           4  0x104052bb7
 mach_o::relocatable::Section<x86_64>::makeFixups(mach_o::relocatable::Parser<x86_64>&,
 mach_o::relocatable::Parser<x86_64>::CFI_CU_InfoArrays const&) + 91
           5  0x10404e7c6
 mach_o::relocatable::Parser<x86_64>::parse(mach_o::relocatable::ParserOptions
 const&) + 2034
           6  0x1040320fd
 mach_o::relocatable::Parser<x86_64>::parse(unsigned char const*, unsigned
 long long, char const*, long, ld::File::Ordinal,
 mach_o::relocatable::ParserOptions const&) + 375
           7  0x1040629cc
 archive::File<x86_64>::makeObjectFileForMember(archive::File<x86_64>::Entry
 const*) const + 758
           8  0x104062518
 archive::File<x86_64>::justInTimeforEachAtom(char const*,
 ld::File::AtomHandler&) const + 122
           9  0x10407819b  ld::tool::InputFiles::searchLibraries(char
 const*, bool, bool, bool, ld::File::AtomHandler&) const + 215
           10  0x104080c90  ld::tool::Resolver::resolveUndefines() + 160
           11  0x104082f63  ld::tool::Resolver::resolve() + 79
           12  0x1040276c7  main + 689
           A linker snapshot was created at:
           /tmp/build_script_build-0fd30e212c66cd59-2022-05-30-185930.ld-
 snapshot
           ld: Assertion failed: (name != NULL), function Fixup, file
 /SourceCache/ld64/ld64-241.9/src/ld/ld.hpp, line 510.
           clang: error: linker command failed with exit code 1 (use -v to
 see invocation)
 }}}

 https://build.macports.org/builders/ports-10.9_x86_64-builder/builds/193549/steps
 /install-port/logs/stdio

--

-- 
Ticket URL: <https://trac.macports.org/ticket/65246#comment:11>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list