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,253
    • Issues 4,253
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 397
    • Merge Requests 397
  • 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
  • #3808

Closed
Open
Opened Jan 07, 2010 by paolino@trac-paolino

piping binary files sometimes fail

I'm having this random bug , sometimes code succeed, sometimes not. It must be noted that I had to choose 5000 to exploit the randomness of it With 10000 it always fail, with 100 it always succeed. Also substituting "take 5000 fibs" with [0..5000] it always succeed, probably because it's much faster.

This is the console output, for 2 consecutive shots. Notice that faster machines, or different kernels could need a different 5000, or never show the bug.

paolino@paolino-desktop:~$ ./prod | cat |./cons
5000
paolino@paolino-desktop:~$ ./prod | cat |./cons
cons: <stdin>: hLookAhead: invalid argument (Invalid or incomplete multibyte or wide character)
Edited Mar 09, 2019 by Ian Lynagh <igloo@earth.li>
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#3808