Opened 7 years ago

Closed 7 years ago

#2479 closed bug (duplicate)

Crash on printing a ClockTime with a negative value for number of seconds since the epoch

Reported by: wozer Owned by:
Priority: normal Milestone:
Component: Compiler Version: 6.8.3
Keywords: Cc:
Operating System: Windows Architecture: x86
Type of failure: Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description

This happened on a Windows XP machine.

Example program:

import System.Time
import Control.Exception

main= do
  let agesAgo = TOD (-1000) 0 
  putStrLn "created"    
  test <- evaluate agesAgo
  putStrLn "evaluated"
  putStrLn $ show test -- crashes
  putStrLn "printed"      

Output:

created
evaluated
Segmentation fault/access violation in generated code

Change History (2)

comment:1 Changed 7 years ago by wagstaff

Duplicate 2425?

comment:2 Changed 7 years ago by igloo

  • difficulty set to Unknown
  • Resolution set to duplicate
  • Status changed from new to closed

Yup, looks like a duplicate of #2425; thanks wagstaff.

To echo that ticket: System.Time is indeed deprecated, you should use the new time package preferably.

Note: See TracTickets for help on using tickets.