Skip to content

GHC plugins (specifically record-dot-preprocessor's Plugin) fail with segfault #1762

Open
@avnik

Description

@avnik

This template is a guide only, feel free add or omit sections as appropriate.

Using compiler plugin (record-dot-preprocessor) lead GHC to crash (which not happens with regular GHC outside haskell.nix)

A clear and concise description of what the bug is, including:

  • Build system (x86_64-linux).
  • GHC version. 8.10.7
  • Haskell.nix version (or commit) used -- b92bb7e

Steps To Reproduce

I'd make repo branch -- https://github.com/avnik/record-dot-preprocessor/tree/haskell.nix-segfault-repro
(current master of RDP with flake.nix from getting started example with minimal editing of cabal name inside)

nix develop then cabal test
A clear and concise description of what you expected to happen.

[4 of 6] Compiling PluginExample    ( test/PluginExample.hs, /home/avn/work/juspay/record-dot-preprocessor/dist-newstyle/build/x86_64-linux/ghc-8.10.7/record-dot-preprocessor-0.2.15/t/record-dot-preprocessor-test/build/record-dot-preprocessor-test/record-dot-preprocessor-test-tmp/PluginExample.o )
Error: cabal: Failed to build test:record-dot-preprocessor-test from
record-dot-preprocessor-0.2.15. The build process segfaulted (i.e. SIGSEGV)

Expected behavior, that it's build. (we use RDP on both 8.10.7 and 8.8.4 with regular nixpkgs haskell framework)

PS I'd check more ghc versions and try to make "do-nothing" plugin, to check, if plugins works at all.
PPS Looks like a generic problem for 8.10.7, empty demo plugin trigger same problem https://github.com/avnik/haskell-nix-plugin-segfault-repro

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpreservedKeep stale bot away

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions