Ticket #2479 (closed bug: duplicate)

Opened 5 years ago

Last modified 5 years ago

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: Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

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

Changed 5 years ago by wagstaff

Duplicate 2425?

Changed 5 years ago by igloo

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

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.