Shea Levy via llvm-dev
2016-Oct-21 13:19 UTC
[llvm-dev] Segfault in llc 3.8.0 building GHC
Hi all, I'm hitting a segfault in llc when trying to build GHC: http://sprunge.us/ZVGB. What is the best way to debug this? I'm able to bump to 3.8.1 if needed, but GHC tends to break when updating major versions due to IR incompatibilities. Thanks, Shea -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 800 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20161021/d92d6963/attachment.sig>
Davide Italiano via llvm-dev
2016-Oct-21 18:50 UTC
[llvm-dev] Segfault in llc 3.8.0 building GHC
On Fri, Oct 21, 2016 at 6:19 AM, Shea Levy via llvm-dev <llvm-dev at lists.llvm.org> wrote:> Hi all, > > I'm hitting a segfault in llc when trying to build GHC: > http://sprunge.us/ZVGB. What is the best way to debug this? I'm able to > bump to 3.8.1 if needed, but GHC tends to break when updating major > versions due to IR incompatibilities. > > Thanks, > Shea > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >The stack dump contains the program arguments so you should be able to reproduce the crash yourself. 0. Program arguments: /nix/store/izlawmnrzpk5sbr62c757cxay0kdlgam-llvm-3.8.0/bin/llc -O3 -relocation-model=dynamic-no-pic /private/tmp/nix-build-ghc-8.1.201601019.drv-3/ghc37608_0/ghc_5.bc -o /private/tmp/nix-build-ghc-8.1.201601019.drv-3/ghc37608_0/ghc_6.lm_s --enable-tbaa=true -mattr=+v7,+vfp3 [...] 1. Running pass 'Function Pass Manager' on module '/private/tmp/nix-build-ghc-8.1.201601019.drv-3/ghc37608_0/ghc_5.bc'. 2. Running pass 'Prologue/Epilogue Insertion & Frame Finalization' on function '@"stg_unmaskAsyncExceptionszh_ret_info$def"' If you're able to repro, I recommend to get LLVM trunk from svn and see if you can still reproduce, and report a bug in that case (or if it doesn't, backport the commit(s) that fixed). -- Davide "There are no solved problems; there are only problems that are more or less solved" -- Henri Poincare
Justin Bogner via llvm-dev
2016-Oct-21 18:57 UTC
[llvm-dev] Segfault in llc 3.8.0 building GHC
Davide Italiano via llvm-dev <llvm-dev at lists.llvm.org> writes:> On Fri, Oct 21, 2016 at 6:19 AM, Shea Levy via llvm-dev > <llvm-dev at lists.llvm.org> wrote: >> Hi all, >> >> I'm hitting a segfault in llc when trying to build GHC: >> http://sprunge.us/ZVGB. What is the best way to debug this? I'm able to >> bump to 3.8.1 if needed, but GHC tends to break when updating major >> versions due to IR incompatibilities. >> >> Thanks, >> Shea >> >> _______________________________________________ >> LLVM Developers mailing list >> llvm-dev at lists.llvm.org >> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >> > > The stack dump contains the program arguments so you should be able to > reproduce the crash yourself. > > 0. Program arguments: > /nix/store/izlawmnrzpk5sbr62c757cxay0kdlgam-llvm-3.8.0/bin/llc -O3 > -relocation-model=dynamic-no-pic > /private/tmp/nix-build-ghc-8.1.201601019.drv-3/ghc37608_0/ghc_5.bc -o > /private/tmp/nix-build-ghc-8.1.201601019.drv-3/ghc37608_0/ghc_6.lm_s > --enable-tbaa=true -mattr=+v7,+vfp3 > [...] > 1. Running pass 'Function Pass Manager' on module > '/private/tmp/nix-build-ghc-8.1.201601019.drv-3/ghc37608_0/ghc_5.bc'. > 2. Running pass 'Prologue/Epilogue Insertion & Frame Finalization' on > function '@"stg_unmaskAsyncExceptionszh_ret_info$def"' > > If you're able to repro, I recommend to get LLVM trunk from svn and > see if you can still reproduce, and report a bug in that case (or if > it doesn't, backport the commit(s) that fixed).Note that bitcode is forward-compatible, so ghc_5.bc should be readable by LLVM trunk, even if the textual IR might not be.
Shea Levy via llvm-dev
2016-Oct-26 10:08 UTC
[llvm-dev] Segfault in llc 3.8.0 building GHC
I found a fix! The first hunk of https://reviews.llvm.org/D17533 (lib/CodeGen/TargetFrameLoweringImpl.cpp) on top of 3.8.1 does the trick. Does llvm do patch releases of old versions? Davide Italiano <davide at freebsd.org> writes:> On Fri, Oct 21, 2016 at 6:19 AM, Shea Levy via llvm-dev > <llvm-dev at lists.llvm.org> wrote: >> Hi all, >> >> I'm hitting a segfault in llc when trying to build GHC: >> http://sprunge.us/ZVGB. What is the best way to debug this? I'm able to >> bump to 3.8.1 if needed, but GHC tends to break when updating major >> versions due to IR incompatibilities. >> >> Thanks, >> Shea >> >> _______________________________________________ >> LLVM Developers mailing list >> llvm-dev at lists.llvm.org >> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >> > > The stack dump contains the program arguments so you should be able to > reproduce the crash yourself. > > 0. Program arguments: > /nix/store/izlawmnrzpk5sbr62c757cxay0kdlgam-llvm-3.8.0/bin/llc -O3 > -relocation-model=dynamic-no-pic > /private/tmp/nix-build-ghc-8.1.201601019.drv-3/ghc37608_0/ghc_5.bc -o > /private/tmp/nix-build-ghc-8.1.201601019.drv-3/ghc37608_0/ghc_6.lm_s > --enable-tbaa=true -mattr=+v7,+vfp3 > [...] > 1. Running pass 'Function Pass Manager' on module > '/private/tmp/nix-build-ghc-8.1.201601019.drv-3/ghc37608_0/ghc_5.bc'. > 2. Running pass 'Prologue/Epilogue Insertion & Frame Finalization' on > function '@"stg_unmaskAsyncExceptionszh_ret_info$def"' > > If you're able to repro, I recommend to get LLVM trunk from svn and > see if you can still reproduce, and report a bug in that case (or if > it doesn't, backport the commit(s) that fixed). > > -- > Davide > > "There are no solved problems; there are only problems that are more > or less solved" -- Henri Poincare-------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 800 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20161026/002e7dbc/attachment.sig>