Ticket #7737 (closed bug: fixed)

Opened 3 months ago

Last modified 2 months ago

t7319: Oops! Entered absent arg w_s1Du{v} [lid] [base:GHC.Base.String{tc 36u}]

Reported by: luite Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.7
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

When compiling t7319 from the test suite with -O2, I get the above error, tested with latest HEAD (20130304). Reporting since this looks weird, and t7319 is not compiled with this option in the suite (it's a test for stack traces, i found it while debugging GHCJS which has its own test suite runner but borrows tests from GHC)

luite@wolfgang:~/buildtest/ghcjs/test/ghc/codeGen$ ghc -O2 -fforce-recomp t7319.hs
[1 of 1] Compiling Main             ( t7319.hs, t7319.o )
Linking t7319 ...
luite@wolfgang:~/buildtest/ghcjs/test/ghc/codeGen$ ./t7319 
t7319: Oops!  Entered absent arg w_s1Du{v} [lid] [base:GHC.Base.String{tc 36u}]

Change History

Changed 2 months ago by simonpj@…

commit a37a7f7beee0d12a1cf600e96c6d4450e01e6607

Author: Simon Peyton Jones <simonpj@microsoft.com>
Date:   Tue Mar 5 09:26:27 2013 +0000

    Ensure that isStrictDmd is False for Absent (fixes Trac #7737)
    
    The demand <HyperStr, Absent> for a let-bound value is bit
    strange; it means that the context will diverge, but this
    argument isn't used. We don't want to use call-by-value here,
    even though it's semantically sound if all bottoms mean
    the same.
    
    The fix is easy; just make "isStrictDmd" a bit more perspicuous.
    See Note [Strict demands] in Demand.lhs

 compiler/basicTypes/Demand.lhs |   29 ++++++++++++++++++++++++-----
 1 files changed, 24 insertions(+), 5 deletions(-)

Changed 2 months ago by simonpj

  • status changed from new to closed
  • difficulty set to Unknown
  • resolution set to fixed

To test this I've updated the test codeGen/should_run/T7319 so that it now runs in all ways (not just profiled), which tests this fix.

Simon

Note: See TracTickets for help on using tickets.