Hello, I have been working on building GHC, the Glasgow Haskell Compiler, on Windows using msys2 [1]. We have been having some strange trouble with ghc segfaulting during the bootstrapping process (i.e., during make). The crashes are not very hard to reproduce, but they are not predictable either. This is almost certainly a bug in ghc itself and not with msys2 (although the crashes do not seem to occur in other environments), but I've been having some trouble pinning it down.
What's a good way to debug such crashes? Is it possible to somehow stop the ghc process when it segfaults and attach gdb, or to dump core somehow for later inspection? [1] https://ghc.haskell.org/trac/ghc/wiki/Building/Preparation/Windows Here's one example crash: "inplace/bin/ghc-stage1.exe" -hisuf hi -osuf o -hcsuf hc -static -H32m -O -Werror -Wall -H64m -O0 -this-package-key ghc_4ugNArSu5ba0Z1uHXrbTlU -hide-all-packages -i -icompiler/basicTypes -icompiler/cmm -icompiler/codeGen -icompiler/coreSyn -icompiler/deSugar -icompiler/ghci -icompiler/hsSyn -icompiler/iface -icompiler/llvmGen -icompiler/main -icompiler/nativeGen -icompiler/parser -icompiler/prelude -icompiler/profiling -icompiler/rename -icompiler/simplCore -icompiler/simplStg -icompiler/specialise -icompiler/stgSyn -icompiler/stranal -icompiler/typecheck -icompiler/types -icompiler/utils -icompiler/vectorise -icompiler/stage2/build -icompiler/stage2/build/autogen -Icompiler/stage2/build -Icompiler/stage2/build/autogen -Icompiler/. -Icompiler/parser -Icompiler/utils -Icompiler/../rts/dist/build -Icompiler/stage2 -optP-DGHCI -optP-include -optPcompiler/stage2/build/autogen/cabal_macros.h -package-key Win32_43THQMouBnk2wpnouztX1X -package-key array_GX4NwjS8xZkC2ZPtjgwhnz -package-key base_ESD4aQEEWwsHtYJVc1BwtJ -package-key binpa_17GphrLqCXt1H1lm4Kse1p -package-key bytes_Kc0PyaputnzDnBdZW0y2Gv -package-key conta_ChF4XLXB9JmByIycPzerow -package-key direc_HU5aFxMIQNwGQFzisjuinu -package-key filep_34DFDFT9FVD9pRLLgh8IdQ -package-key hoopl_IZAd44CED5NCOlpg8p2Kaj -package-key hpc_1QTsfQSN40FHN9p3mydARY -package-key proce_7ZlAbRkwiRO8qgXx3NNP0G -package-key templ_F6UJgDtBcDIFWuHmMGEFzy -package-key time_HGs4JcQCd4wF6U8vJQ5fNH -package-key trans_5jw4w9yTgmZ89ByuixDAKP -Wall -fno-warn-name-shadowing -this-package-key ghc -XHaskell2010 -optc-DTHREADED_RTS -DGHCI_TABLES_NEXT_TO_CODE -DSTAGE=2 -Rghc-timing -O2 -fwarn-tabs -O -dcore-lint -no-user-package-db -rtsopts -odir compiler/stage2/build -hidir compiler/stage2/build -stubdir compiler/stage2/build -c compiler/basicTypes/UniqSupply.lhs -o compiler/stage2/build/UniqSupply.o compiler/ghc.mk:657: recipe for target 'compiler/stage2/build/UniqSupply.o' failed make[1]: *** [compiler/stage2/build/UniqSupply.o] Segmentation fault -- Gintautas Miliauskas
------------------------------------------------------------------------------
_______________________________________________ Msys2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/msys2-users
