Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
GHC
GHC
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,273
    • Issues 4,273
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 413
    • Merge Requests 413
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #18496

Closed
Open
Opened Jul 24, 2020 by Javier Neira @jneira

Compiler segfault building floskell in windows 10

Summary

Compiler throws not deterministic segfaults in the floskell package, in the module Floskell.Pretty when building it as dependency of haskell-language-server in windows.

With ghc-8.8.4 and ghc-8.8.3 i ve got:

[10 of 12] Compiling Floskell.Pretty  ( src\Floskell\Pretty.hs, dist\build\Floskell\Pretty.o )

Access violation in generated code when executing data at 0xffffffff8237cb40

 Attempting to reconstruct a stack trace...

   Frame        Code address
 * 0x461dab0    0xffffffff8237cb40
 * 0x461dab8    0x2d006300680067
 * 0x461dac0    0x2e0038002e0038
 * 0x461dac8    0x690000005c0034
 * 0x461dad0    0x5c006e D:\bin\stack\x86_64-windows\ghc-8.8.4\bin\ghc.exe+0x1c006e

D:\bin\stack\x86_64-windows\ghc-8.8.4\bin\ghc-8.8.4.exe returned ExitFailure
11

With ghc-8.10.1:

[10 of 12] Compiling Floskell.Pretty  ( src\Floskell\Pretty.hs, dist\build\Floskell\Pretty.o )
D:\bin\stack\x86_64-windows\ghc-8.10.1\bin\ghc-8.10.1.exe returned ExitFailure
(-1073740791)

Despite the ghc paths i have tested it building with cabal, but the error is thrown with stack as well: Full logs:

  • ghc-8.8.3: https://gist.github.com/jneira/58d138a0180e50d24e543d090263f3c3#file-cabal-build-ghc-8-8-3-v3-fresh-store-ko-log
  • ghc-8.8.4: https://gist.github.com/jneira/58d138a0180e50d24e543d090263f3c3#file-cabal-build-ghc-8-8-4-v3-ko-log
  • ghc-8.10.1: https://gist.github.com/jneira/58d138a0180e50d24e543d090263f3c3#file-cabal-build-ghc-8-10-1-v3-fresh-store-ko-log

However, i have not able to reproduce the error consistently but with windows 10 and ghc-8.8.4.

  • building the package itself works for all ghc versions most of the times
    • so setting the project as a local package in the cabal.project of hls makesthe build work, most of the times
  • i am not able to reproduce it at all in windows 7

Steps to reproduce

Please provide a set of concrete steps to reproduce the issue.

  • pull the haskell-language-server project
  • build with `cabal --store-dir \path\to\new\store build -w ghc-8.8.4

Expected behavior

The compiler should build the module succesfully.

Environment

  • GHC version used: 8.8.3, 8.8.4 and 8.10.1

Optional:

  • Operating System: Windows 10
  • System Architecture: 64 bits

Context: reported originally in the floskell repo: https://github.com/ennocramer/floskell/issues/50

/cc @bgamari

Edited Jul 25, 2020 by Javier Neira
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#18496