#15207: bad dwarf frame in stgRun.c when compiled with with gcc on mac and assembled by as/gcc/clang (aka apple clang assembler) -------------------------------------+------------------------------------- Reporter: carter | Owner: (none) Type: bug | Status: infoneeded Priority: normal | Milestone: 8.8.1 Component: Runtime System | Version: 8.4.3 Resolution: | Keywords: Operating System: MacOS X | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D4781 Wiki Page: | -------------------------------------+------------------------------------- Comment (by carter): my build gets stuck at the following {{{ "inplace/bin/ghc-stage1" -this-unit-id rts -shared -dynamic -dynload deploy -no-auto-link-packages -Lrts/dist/build -lffi -optl-Wl,-rpath -optl-Wl,@loader_path `cat rts/dist/libs.depend` rts/dist/build/STM.dyn_o rts/dist/build/Timer.dyn_o rts/dist/build/ThreadPaused.dyn_o rts/dist/build/Ticky.dyn_o rts/dist/build/ThreadLabels.dyn_o rts/dist/build/RtsMain.dyn_o rts/dist/build/ProfilerReport.dyn_o rts/dist/build/PathUtils.dyn_o rts/dist/build/LibdwPool.dyn_o rts/dist/build/Proftimer.dyn_o rts/dist/build/CheckUnload.dyn_o rts/dist/build/fs.dyn_o rts/dist/build/OldARMAtomic.dyn_o rts/dist/build/HsFFI.dyn_o rts/dist/build/RtsDllMain.dyn_o rts/dist/build/RtsSymbolInfo.dyn_o rts/dist/build/RaiseAsync.dyn_o rts/dist/build/ProfHeap.dyn_o rts/dist/build/Schedule.dyn_o rts/dist/build/Hash.dyn_o rts/dist/build/Trace.dyn_o rts/dist/build/Threads.dyn_o rts/dist/build/Hpc.dyn_o rts/dist/build/Weak.dyn_o rts/dist/build/ProfilerReportJson.dyn_o rts/dist/build/Task.dyn_o rts/dist/build/StgCRun.dyn_o rts/dist/build/ClosureFlags.dyn_o rts/dist/build/RetainerProfile.dyn_o rts/dist/build/Libdw.dyn_o rts/dist/build/Stats.dyn_o rts/dist/build/Interpreter.dyn_o rts/dist/build/Messages.dyn_o rts/dist/build/RtsUtils.dyn_o rts/dist/build/RtsSymbols.dyn_o rts/dist/build/xxhash.dyn_o rts/dist/build/LdvProfile.dyn_o rts/dist/build/Capability.dyn_o rts/dist/build/Printer.dyn_o rts/dist/build/Globals.dyn_o rts/dist/build/Adjustor.dyn_o rts/dist/build/RtsAPI.dyn_o rts/dist/build/Inlines.dyn_o rts/dist/build/TopHandler.dyn_o rts/dist/build/Linker.dyn_o rts/dist/build/Disassembler.dyn_o rts/dist/build/WSDeque.dyn_o rts/dist/build/StaticPtrTable.dyn_o rts/dist/build/Pool.dyn_o rts/dist/build/StgPrimFloat.dyn_o rts/dist/build/FileLock.dyn_o rts/dist/build/RtsStartup.dyn_o rts/dist/build/RetainerSet.dyn_o rts/dist/build/Profiling.dyn_o rts/dist/build/Sparks.dyn_o rts/dist/build/RtsFlags.dyn_o rts/dist/build/RtsMessages.dyn_o rts/dist/build/Stable.dyn_o rts/dist/build/Arena.dyn_o rts/dist/build/Heap.dyn_o rts/dist/build/hooks/StackOverflow.dyn_o rts/dist/build/hooks/LongGCSync.dyn_o rts/dist/build/hooks/OnExit.dyn_o rts/dist/build/hooks/FlagDefaults.dyn_o rts/dist/build/hooks/MallocFail.dyn_o rts/dist/build/hooks/OutOfHeap.dyn_o rts/dist/build/sm/Scav_thr.dyn_o rts/dist/build/sm/Storage.dyn_o rts/dist/build/sm/Evac.dyn_o rts/dist/build/sm/Sanity.dyn_o rts/dist/build/sm/GC.dyn_o rts/dist/build/sm/MarkWeak.dyn_o rts/dist/build/sm/Evac_thr.dyn_o rts/dist/build/sm/BlockAlloc.dyn_o rts/dist/build/sm/GCUtils.dyn_o rts/dist/build/sm/GCAux.dyn_o rts/dist/build/sm/Sweep.dyn_o rts/dist/build/sm/CNF.dyn_o rts/dist/build/sm/Compact.dyn_o rts/dist/build/sm/Scav.dyn_o rts/dist/build/sm/MBlock.dyn_o rts/dist/build/eventlog/EventLog.dyn_o rts/dist/build/eventlog/EventLogWriter.dyn_o rts/dist/build/linker/elf_util.dyn_o rts/dist/build/linker/elf_reloc.dyn_o rts/dist/build/linker/LoadArchive.dyn_o rts/dist/build/linker/elf_plt_arm.dyn_o rts/dist/build/linker/SymbolExtras.dyn_o rts/dist/build/linker/CacheFlush.dyn_o rts/dist/build/linker/Elf.dyn_o rts/dist/build/linker/elf_got.dyn_o rts/dist/build/linker/M32Alloc.dyn_o rts/dist/build/linker/elf_plt_aarch64.dyn_o rts/dist/build/linker/elf_plt.dyn_o rts/dist/build/linker/PEi386.dyn_o rts/dist/build/linker/MachO.dyn_o rts/dist/build/linker/elf_reloc_aarch64.dyn_o rts/dist/build/posix/GetEnv.dyn_o rts/dist/build/posix/Select.dyn_o rts/dist/build/posix/Signals.dyn_o rts/dist/build/posix/TTY.dyn_o rts/dist/build/posix/Itimer.dyn_o rts/dist/build/posix/OSThreads.dyn_o rts/dist/build/posix/GetTime.dyn_o rts/dist/build/posix/OSMem.dyn_o rts/dist/build/Updates.dyn_o rts/dist/build/HeapStackCheck.dyn_o rts/dist/build/StgStdThunks.dyn_o rts/dist/build/Exception.dyn_o rts/dist/build/Apply.dyn_o rts/dist/build/StgMiscClosures.dyn_o rts/dist/build/Compact.dyn_o rts/dist/build/PrimOps.dyn_o rts/dist/build/StgStartup.dyn_o rts/dist/build/AutoApply.dyn_o -fPIC -dynamic -H32m -O -Wall -Iincludes -Iincludes/dist -Iincludes/dist- derivedconstants/header -Iincludes/dist-ghcconstants/header -Irts -Irts/dist/build -DCOMPILING_RTS -DFS_NAMESPACE=rts -this-unit-id rts -dcmm-lint -DDTRACE -i -irts -irts/dist/build -Irts/dist/build -irts/dist/build/./autogen -Irts/dist/build/./autogen -O2 -Wcpp-undef -Wnoncanonical-monad-instances -fno-use-rpaths -o rts/dist/build/libHSrts-ghc8.6.2.dylib 0 0x10c2f3898 __assert_rtn + 129 1 0x10c30c983 mach_o::relocatable::Parser<x86_64>::parse(mach_o::relocatable::ParserOptions const&) + 3153 2 0x10c30274c mach_o::relocatable::Parser<x86_64>::parse(unsigned char const*, unsigned long long, char const*, long, ld::File::Ordinal, mach_o::relocatable::ParserOptions const&) + 282 3 0x10c35a12c ld::tool::InputFiles::makeFile(Options::FileInfo const&, bool) + 1014 4 0x10c35d4f7 ld::tool::InputFiles::parseWorkerThread() + 533 5 0x7fff59b6d661 _pthread_body + 340 6 0x7fff59b6d50d _pthread_body + 0 A linker snapshot was created at: /tmp/libHSrts-ghc8.6.2.dylib-2018-10-12-212259.ld-snapshot ld: Assertion failed: (cfiStartsArray[i] != cfiStartsArray[i-1]), function parse, file /Library/Caches/com.apple.xbs/Sources/ld64_Fall2018/ld64-409.12/src/ld/parsers/macho_relocatable_file.cpp, line 1939. collect2: error: ld returned 1 exit status `gcc-8' failed in phase `Linker'. (Exit code: 1) rts/ghc.mk:315: recipe for target 'rts/dist/build/libHSrts-ghc8.6.2.dylib' failed make[1]: *** [rts/dist/build/libHSrts-ghc8.6.2.dylib] Error 1 Makefile:122: recipe for target 'all' failed make: *** [all] Error 2 }}} i tried out using LLVM 7's ld.lld tool, and i had the same problme/error there.. iVe 1-2 ideas left i'm going to try -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15207#comment:34> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler