[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | skaller <skaller@u...> |
| Subject: | Re: [Caml-list] nat too big? |
On Sat, 2007-06-23 at 08:47 +1000, skaller wrote:
> On Sat, 2007-06-23 at 08:42 +1000, skaller wrote:
> > On Sat, 2007-06-23 at 08:37 +1000, skaller wrote:
> > > I'm getting an error in Win64 native code compiler generated code:
> > >
> > > output_value: nat too big
> > >
> > > What does that mean? Looks like a Marshalling bug?
> >
> > Woops... that's an error in Ocs_scheme .. sorry for noise..
>
> Double woops .. not it isn't ;(
Hmm .. found it: in ocaml/otherlibs/num/nat_stubs.c,
this code is wrong:
#ifdef ARCH_SIXTYFOUR
len = len * 2; /* two 32-bit words per 64-bit digit */
if (len >= (1L << 32))
failwith("output_value: nat too big");
#endif
because 1L << 32 will overflow on _WIN64 because long
integers are still only 32 bits.
[in bugtracker]
--
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net