From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 38CEBBC57 for ; Sat, 10 Jul 2010 16:55:28 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApUBAGcmOExCbwQbkWdsb2JhbACUDIxAFQEBAQEJCwoHEQQevTQFhSeEIoQugjo X-IronPort-AV: E=Sophos;i="4.55,179,1278280800"; d="scan'208";a="63083720" Received: from out3.smtp.messagingengine.com ([66.111.4.27]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/ADH-AES256-SHA; 10 Jul 2010 16:55:27 +0200 Received: from compute2.internal (compute2.internal [10.202.2.42]) by gateway1.messagingengine.com (Postfix) with ESMTP id 87DD816BD45 for ; Sat, 10 Jul 2010 10:55:26 -0400 (EDT) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute2.internal (MEProxy); Sat, 10 Jul 2010 10:55:26 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=date:from:to:subject:message-id:references:mime-version:content-type:in-reply-to; s=smtpout; bh=yDScmczsBOusGcrDLL9JlfytVPw=; b=szWQ1dybV0twmzspTAVn0D7a8kTwczs9XVZhBjMrcbFqktdjYqIpKaGgAfc0QWSFkTZbyfNVdNtfx6UfC1NMvrXI06RjW1tsbL/SxKUcojDA4uuB6VjncIG2LzNohTh5wrSSclBTS9Uxj0jCWiZV38xNjRwdVeB0bjAqL3XI2kM= X-Sasl-enc: fC4ao86+K6i6cvuXLBLgW8X/Hvu1pumplAu5uyQ/Y6wL 1278773726 Received: from localhost (unknown [69.86.121.157]) by mail.messagingengine.com (Postfix) with ESMTPSA id 2972949AD7B for ; Sat, 10 Jul 2010 10:55:26 -0400 (EDT) Date: Sat, 10 Jul 2010 10:56:15 -0400 From: Jim Pryor To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Re: How public is Num.Nat Message-ID: <20100710145615.GE2772@vaio.earthlink.net> References: <7d8707de0811070133s5b4b8b36kd514eadb0be8a78f@mail.gmail.com> <20100710124228.GD2772@vaio.earthlink.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100710124228.GD2772@vaio.earthlink.net> User-Agent: Mutt/1.5.20 (2009-06-14) X-Spam: no; 0.00; nat:01 nat:01 10,:98 wrote:01 heap:01 caml-list:01 int:01 arbitrary:02 modules:02 caml:02 bounds:02 checking:02 seems:03 module:03 module:03 On Sat, Jul 10, 2010 at 08:42:28AM -0400, Jim Pryor wrote: > Hi I'm looking into wrapping the Nat module from the Num package. I > can't find any documentation for it, but the source + a bit of guesswork makes > it somewhat accessible. > > However, superficially at least it looks like this library enables > arbitrary getting/setting of bytes in the program's heap, with no > bounds checking. Please tell me it's not so! I found the documentation from 1992 here: ftp://ftp.inria.fr/INRIA/publication/publi-pdf/RT/RT-0141.pdf Not quite the same location listed in Ch 22 of the ref manual, but not too far off, either. It seems that what I observed is indeed the documented behavior of the Nat module. The Big_int and Num modules hide that nastiness away. -- Jim Pryor profjim@jimpryor.net