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
  • #17353

Closed
Open
Opened Oct 13, 2019 by fxcoudert@trac-fxcoudert

ghc 8.8.1 fails on macOS 10.15 Catalina

Summary

ghc 8.8.1 compiled on macOS 10.15 with system compiler (Xcode 11.1) completes bootstrap, but the compiler later fails to run simple programs with a memory-related error:

ghc: mmap 131072 bytes at 0x0: Operation not permitted
ghc: Try specifying an address with +RTS -xm<addr> -RTS
ghc: internal error: m32_allocator_init: Failed to map
    (GHC version 8.8.1 for x86_64_apple_darwin)

This is reproducible in several setups, both inside VMs and on physical hardware.

Steps to reproduce

On macOS 10.15 Catalina, with Xcode 11.1 (system compiler):

  • ghc 8.8.1 is built from ghc-8.8.1-src.tar.xz (as part of Homebrew)
  • bootstrap completes
  • Run a simple test, watch if fail:
rmeur /tmp $ cat hello.rs
main = putStrLn "Hello Homebrew"
rmeur /tmp $ /usr/local/Cellar/ghc/8.8.1/bin/runghc -v hello.rs
Glasgow Haskell Compiler, Version 8.8.1, stage 2 booted by GHC version 8.6.5
Using binary package database: /usr/local/Cellar/ghc/8.8.1/lib/ghc-8.8.1/package.conf.d/package.cache
package flags []
loading package database /usr/local/Cellar/ghc/8.8.1/lib/ghc-8.8.1/package.conf.d
wired-in package ghc-prim mapped to ghc-prim-0.5.3
wired-in package integer-wired-in mapped to integer-gmp-1.0.2.0
wired-in package base mapped to base-4.13.0.0
wired-in package rts mapped to rts
wired-in package template-haskell mapped to template-haskell-2.15.0.0
wired-in package ghc mapped to ghc-8.8.1
package flags []
loading package database /usr/local/Cellar/ghc/8.8.1/lib/ghc-8.8.1/package.conf.d
wired-in package ghc-prim mapped to ghc-prim-0.5.3
wired-in package integer-wired-in mapped to integer-gmp-1.0.2.0
wired-in package base mapped to base-4.13.0.0
wired-in package rts mapped to rts-1.0
wired-in package template-haskell mapped to template-haskell-2.15.0.0
wired-in package ghc mapped to ghc-8.8.1
*** Desugar:
*** Simplify [expr]:
!!! Simplify [expr]: finished in 0.18 milliseconds, allocated 0.056 megabytes
*** CorePrep [expr]:
!!! CorePrep [expr]: finished in 3.17 milliseconds, allocated 1.705 megabytes
*** ByteCodeGen [Ghci1]:
!!! ByteCodeGen [Ghci1]: finished in 0.10 milliseconds, allocated 0.029 megabytes
ghc: mmap 131072 bytes at 0x0: Operation not permitted
ghc: Try specifying an address with +RTS -xm<addr> -RTS
ghc: internal error: m32_allocator_init: Failed to map
    (GHC version 8.8.1 for x86_64_apple_darwin)
    Please report this as a GHC bug:  https://www.haskell.org/ghc/reportabug

Expected behavior

The program should run without error.

Environment

  • GHC version used:

Optional:

  • Operating System: macOS 10.15 Catalina
  • System Architecture: x86_64
Assignee
Assign to
8.8.2
Milestone
8.8.2 (Past due)
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#17353