[MacPorts] #58442: clang-7, 8.0 - seg. faults when used as assembler with assertions variant active.

MacPorts noreply at macports.org
Fri May 10 01:15:48 UTC 2019


#58442: clang-7,8.0 - seg. faults when used as assembler with assertions variant
active.
----------------------------------+--------------------
  Reporter:  mouse07410           |      Owner:  (none)
      Type:  defect               |     Status:  new
  Priority:  Normal               |  Milestone:
 Component:  ports                |    Version:
Resolution:                       |   Keywords:
      Port:  clang-7.0 clang-8.0  |
----------------------------------+--------------------

Comment (by kencu):

 OK, so the crash is reproducible. Steps to reproduce:

 1. install llvm-devel (comes with assertions on)
 2. install cctools +llvmdev
 3. select clang-devel using `sudo port select clang clang-devel`
 4. try to build gcc9 `sudo port -v destroot gcc9 configure.compiler
 =macports-clang

 and you get mouse's exact error, more or less, in clang trunk:
 {{{
 Assertion failed: (!CreatedADWARFSection && "Creating regular section
 after DWARF"), function ChangeSection, file /opt/local/var/macports/build
 /_opt_bblocal_var_buildworker_ports_build_ports_lang_llvm-devel/llvm-
 devel/work/trunk/lib/MC/MCMachOStreamer.cpp, line 158.
 Stack dump:
 0.      Program arguments: /opt/local/libexec/llvm-devel/bin/clang -cc1as
 -triple x86_64-apple-macosx10.5.0 -filetype obj -main-file-name - -target-
 cpu core2 -I . -I . -I ../.././gcc -I
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc9/gcc9/work/gcc-9.1.0/libgcc
 -I
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc9/gcc9/work/gcc-9.1.0/libgcc/.
 -I
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc9/gcc9/work/gcc-9.1.0/libgcc/../gcc
 -I
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc9/gcc9/work/gcc-9.1.0/libgcc/../include
 -fdebug-compilation-dir
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc9/gcc9/work/build/x86_64
 -apple-darwin18/libgcc -dwarf-debug-producer clang version 9.0.0 (trunk
 357237) -I . -I . -I ../.././gcc -I
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc9/gcc9/work/gcc-9.1.0/libgcc
 -I
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc9/gcc9/work/gcc-9.1.0/libgcc/.
 -I
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc9/gcc9/work/gcc-9.1.0/libgcc/../gcc
 -I
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc9/gcc9/work/gcc-9.1.0/libgcc/../include
 -dwarf-version=2 -mrelocation-model pic -o cpuinfo_s.o -
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc9/gcc9/work/build/./gcc/xgcc
 -B/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc9/gcc9/work/build/./gcc/
 -B/opt/local/x86_64-apple-darwin18/bin/ -B/opt/local/x86_64-apple-
 darwin18/lib/ -isystem /opt/local/x86_64-apple-darwin18/include -isystem
 /opt/local/x86_64-apple-darwin18/sys-include   -fno-checking -g -O2 -pipe
 -Os
 -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk
 -O2 -g -O2 -pipe -Os
 -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk
 -DIN_GCC    -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-
 format -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition
 -isystem ./include  -I. -I. -I../.././gcc
 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc9/gcc9/work/gcc-9.1.0/libgcc
 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc9/gcc9/work/gcc-9.1.0/libgcc/.
 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc9/gcc9/work/gcc-9.1.0/libgcc/../gcc
 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc9/gcc9/work/gcc-9.1.0/libgcc/../include
 -g0  -finhibit-size-directive -fno-inline -fno-exceptions -fno-zero-
 initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize -fbuilding-
 libgcc -fno-stack-protector   -I. -I. -I../.././gcc
 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc9/gcc9/work/gcc-9.1.0/libgcc
 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc9/gcc9/work/gcc-9.1.0/libgcc/.
 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc9/gcc9/work/gcc-9.1.0/libgcc/../gcc
 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc9/gcc9/work/gcc-9.1.0/libgcc/../include
 -o crttme.o -MT crttme.o -MD -MP -MF crttme.dep  -DEND -c
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc9/gcc9/work/gcc-9.1.0/libgcc/config
 /darwin-crt-tm.c
 0  libLLVM.dylib            0x0000000106126ed8
 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 37
 1  libLLVM.dylib            0x00000001061272c9 SignalHandler(int) + 200
 2  libsystem_platform.dylib 0x00007fff79f5bb5d _sigtramp + 29
 3  libsystem_platform.dylib 0x0000000105ff0938 _sigtramp + 2349420024
 4  libsystem_c.dylib        0x00007fff79e1b6a6 abort + 127
 5  libsystem_c.dylib        0x00007fff79de420d basename_r + 0
 6  libLLVM.dylib            0x0000000106ddfa57 (anonymous
 namespace)::MCMachOStreamer::ChangeSection(llvm::MCSection*, llvm::MCExpr
 const*) + 793
 7  libLLVM.dylib            0x0000000106ded7d9
 llvm::MCStreamer::SwitchSection(llvm::MCSection*, llvm::MCExpr const*) +
 97
 8  libLLVM.dylib            0x0000000106e28b1d (anonymous
 namespace)::DarwinAsmParser::parseSectionSwitch(llvm::StringRef,
 llvm::StringRef, unsigned int, unsigned int, unsigned int) + 201
 9  libLLVM.dylib            0x0000000106e292f4 bool
 llvm::MCAsmParserExtension::HandleDirective<(anonymous
 namespace)::DarwinAsmParser, &((anonymous
 namespace)::DarwinAsmParser::parseSectionDirectiveModInitFunc(llvm::StringRef,
 llvm::SMLoc))>(llvm::MCAsmParserExtension*, llvm::StringRef, llvm::SMLoc)
 + 44
 10 libLLVM.dylib            0x0000000106e11fe1 (anonymous
 namespace)::AsmParser::parseStatement((anonymous
 namespace)::ParseStatementInfo&, llvm::MCAsmParserSemaCallback*) + 3833
 11 libLLVM.dylib            0x0000000106e0d877 (anonymous
 namespace)::AsmParser::Run(bool, bool) + 389
 12 clang                    0x0000000101b25bc6
 cc1as_main(llvm::ArrayRef<char const*>, char const*, void*) + 10730
 13 clang                    0x0000000101b20df0 main + 7865
 14 libdyld.dylib            0x00007fff79d763d5 start + 1
 15 libdyld.dylib            0x0000000000000030 start + 2250808412
 clang: error: unable to execute command: Abort trap: 6
 clang: error: clang integrated assembler command failed due to signal (use
 -v to see invocation)
 clang version 9.0.0 (trunk 357237)
 Target: x86_64-apple-darwin18.5.0
 Thread model: posix
 InstalledDir: /opt/local/libexec/llvm-devel/bin
 clang: note: diagnostic msg: PLEASE submit a bug report to
 https://bugs.llvm.org/ and include the crash backtrace, preprocessed
 source, and associated run script.
 clang: note: diagnostic msg: Error generating preprocessed source(s) - no
 preprocessable inputs.
 make[3]: *** [cpuinfo_s.o] Error 1
 }}}
 so that's at least satisfying.

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


More information about the macports-tickets mailing list