Opened 5 years ago

Closed 5 years ago

#7310 closed bug (fixed)

Compiler nontermination on UNPACK pragmas

Reported by: nwf Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.6.1
Keywords: Cc:
Operating System: Linux Architecture: x86_64 (amd64)
Type of failure: Compile-time crash Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


Feeding GHC 7.6.1 (from git) ill-advised UNPACK pragmas like

data T1 = T1 {-# UNPACK #-} !T1

results in GHC going into infinite wait; gdb reports

#1  0x0000000001f7f979 in waitCondition ()
#2  0x0000000001f68c3b in yieldCapability ()
#3  0x0000000001f712d2 in schedule ()
#4  0x0000000001f727b5 in scheduleWaitThread ()
#5  0x0000000001f6f40e in real_main ()
#6  0x0000000001f6f50a in hs_main ()
#7  0x0000000000495763 in main ()

This happens, apparently, whenever there's possible recursion through an UNPACK pragma, even in the (I think) well-formed

data T0 = T0 T1
data T1 = T1 {-# UNPACK #-} !T0

Change History (2)

comment:1 Changed 5 years ago by guest

See also #7446

comment:2 Changed 5 years ago by igloo

difficulty: Unknown
Resolution: fixed
Status: newclosed

Thanks for the report. This is fixed in HEAD and the 7.6 branch by ba8fd081ba9b222dd5f93604d7deeaca372e4511.

Note: See TracTickets for help on using tickets.