Mercury Bugs - mercury
View Issue Details
0000069mercuryBugpublic2008-07-23 20:022008-07-23 21:06
Assigned To 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000069: Deep profiling tools can have integer overflows.
DescriptionThe deep profiler and it's tools use machine word sized integers. (the int type in mercury). On 32 bit machines these values can be overflowed by a long-enough profiling run. Since the int type is a signed integer this can result in negative numbers.

This can be seen with the icfp2000 program in the 'bytes allocated' statistic of the float.+ and float.* functions.
TagsNo tags attached.
Attached Files

2008-07-23 21:06   
This has come up before. IIRC, there is not a good solution (other than to use a 64-bit machine)
since the Mercury code in the deep profiler also needs to manipulate these values.
One thing which might alleviate the problem somewhat is to support unsigned integers
as atomic types in Mercury.

Issue History
2008-07-23 20:02pboneNew Issue
2008-07-23 21:06juliensfNote Added: 0000106