Posix.ProcEnv.times raises Time exception

Stephen Weeks MLton@sourcelight.com
Mon, 23 Apr 2001 12:02:55 -0700 (PDT)


Number: *
Title:       Posix.ProcEnv.times raises Time exception
Keywords:    
Submitter:   Stephen Weeks <sweeks@acm.org>
Date:        04/23/01
Version:     110.30
System:      x86-linux
Severity:    
Problem:     

Posix.ProcEnv.times raises a Time execption on machines with large uptimes, in
particular, when the uptime is such that the number of clock ticks is >= 2^31.
This happens because the times function is returning an unsigned integer number
of clock ticks, which is being treated as signed, and hence is thought to be
negative.

Code:        

Transcript:  

% uptime
 11:58am  up 283 days,  8:33,  2 users,  load average: 1.06, 0.76, 0.62
% sml
Standard ML of New Jersey v110.30 [FLINT v1.5], November 3, 2000
- Posix.ProcEnv.times();
[autoloading]
[autoloading done]

uncaught exception Time
  raised at: Basis/Implementation/time.sml:53.15-53.19
             ../compiler/TopLevel/interact/evalloop.sml:60.55
             ../compiler/TopLevel/main/compile.sml:231.13-231.58
             ../compiler/MiscUtil/util/stats.sml:190.40
             ../compiler/TopLevel/

Comments:    
Fix:         
Test: *
Owner: *
Status: *