Opened 10 years ago

Closed 10 years ago

Last modified 9 years ago

#1321 closed bug (fixed)

GHCi stdout bug when base package is not optimised

Reported by: simonmar Owned by: simonmar
Priority: normal Milestone: 6.8.1
Component: GHCi Version: 6.7
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

Reported by Igloo:

The problem from a couple of weeks ago, where ghci's hFlush command seems to be flushing a different stdout to the one that expressions evaluated by ghci write to, happens with a "quickest" build:

SRC_HC_OPTS     = -H64m -Onot -fasm
GhcStage1HcOpts = -O -fasm
GhcStage2HcOpts = -Onot -fasm
GhcLibHcOpts    = -Onot -fasm
GhcLibWays      =
SplitObjs       = NO

but not if libraries are optimised:

SRC_HC_OPTS     = -H64m -Onot -fasm
GhcStage1HcOpts = -O -fasm
GhcStage2HcOpts = -Onot -fasm
GhcLibHcOpts    = -O -fasm
GhcLibWays      =
SplitObjs       = NO

ghci004 is an example of a failing test (no output is printed if libraries are not optimised).

This seems completely illogical to me. I'd have expected such a bug would be caused by optimisation meaning stdout gets inlined somewhere or something. Very curious!

Change History (5)

comment:1 Changed 10 years ago by simonmar

Owner: set to simonmar

i'll look at this

comment:2 Changed 10 years ago by simonmar

Component: CompilerGHCi
Resolution: fixed
Status: newclosed

Fixed:

Thu May 10 14:37:21 BST 2007  Simon Marlow <simonmar@microsoft.com>
  * FIX #1321: problems with accessing the interpreter's Handles

comment:3 Changed 10 years ago by igloo

Milestone: 6.8 branch6.8.1

comment:4 Changed 9 years ago by simonmar

Architecture: UnknownUnknown/Multiple

comment:5 Changed 9 years ago by simonmar

Operating System: UnknownUnknown/Multiple
Note: See TracTickets for help on using tickets.