Linux EXDR integer problems

From: Warwick Harvey <wh_at_icparc.ic.ac.uk>
Date: Thu 07 Jun 2001 02:55:28 PM GMT
Message-ID: <20010607155528.I3879@tempest.icparc.ic.ac.uk>
The EXDR format on i386_linux seems to have problems with 32-bit (33-bit if
you include a sign bit) integers.

goat: ~/rotds/stable/bin/i386_linux/eclipse
ECLiPSe Constraint Logic Programming System [kernel]
Copyright Imperial College London and ICL
Certain libraries copyright Parc Technologies Ltd
GMP library copyright Free Software Foundation
Version 5.2 #4, Thu Jun  7 01:15 2001
[eclipse 1]: open(queue(""), update, q, []),
write_exdr(q, 2147483648),
read_exdr(q, D).

*** Overflow of the global/trail stack in spite of garbage collection!
You are probably out of virtual memory (swap space).
Peak sizes were: global stack 4196 kbytes, trail stack 540 kbytes
D = Abort
[eclipse 2]: 
bye
goat: 

Some playing around is interesting.  It appears:

< 32 bits	fine
32 bits		stack overflow
33-63 bits	fine
>= 64 bits	failure

I understand that for some reason bignums are not supported by EXDR (hence
the failure for >= 64 bits).  However, it looks like there's an off-by-one
error for the transition between the 32 bit and 64 bit representations.

(Above bit counts are for the unsigned numbers.)

Cheers,
Warwick
Received on Thu Jun 07 15:55:29 2001

This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:08:07 PM GMT GMT