From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 04902BC6E for ; Sat, 23 Jun 2007 00:58:59 +0200 (CEST) Received: from ipmail03.adl2.internode.on.net (ipmail03.adl2.internode.on.net [203.16.214.135]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l5MMwuWu013367 for ; Sat, 23 Jun 2007 00:58:58 +0200 X-IronPort-AV: E=Sophos;i="4.16,453,1175437800"; d="scan'208";a="106566083" Received: from ppp59-167-2-129.lns1.syd7.internode.on.net (HELO [192.168.1.201]) ([59.167.2.129]) by ipmail03.adl2.internode.on.net with ESMTP; 23 Jun 2007 08:28:55 +0930 Subject: Re: [Caml-list] nat too big? From: skaller To: caml-list In-Reply-To: <1182552443.26725.32.camel@rosella.wigram> References: <1182551865.26725.29.camel@rosella.wigram> <1182552178.26725.30.camel@rosella.wigram> <1182552443.26725.32.camel@rosella.wigram> Content-Type: text/plain Date: Sat, 23 Jun 2007 08:58:53 +1000 Message-Id: <1182553133.26725.37.camel@rosella.wigram> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Content-Transfer-Encoding: 7bit X-Miltered: at discorde with ID 467C5430.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; nat:01 compiler:01 nat:01 marshalling:01 bug:01 ocaml:01 otherlibs:01 stubs:01 ifdef:01 failwith:01 integers:01 sourceforge:01 wrote:01 wrote:01 caml-list:01 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 Felix, successor to C++: http://felix.sf.net