From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p04H51RJ013250 for ; Tue, 4 Jan 2011 18:05:01 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApMAANnhIk3RVdivkGdsb2JhbACkNAgVAQEBAQkJDAcRBCCkXIl3ghiFFy6GTgEBAwWFRQSLBw X-IronPort-AV: E=Sophos;i="4.60,273,1291590000"; d="scan'208";a="85329902" Received: from mail-qy0-f175.google.com ([209.85.216.175]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-MD5; 04 Jan 2011 18:04:55 +0100 Received: by qyk8 with SMTP id 8so15169039qyk.6 for ; Tue, 04 Jan 2011 09:04:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type; bh=GfioOeLnpOhFJSGhGTRaHDID9iDyzVHFNZQ5Kxpgfjw=; b=KN4tPe5mh+9fCI2qFcf1ubNG72p7Yd1CjXhObtfVph2i+zeUOJXKXBFPCTVPg2j2V6 qZ2fH/e14SR6jNeoIj1dJhsnVHKVH2eWhS87YNZzl/IiwjTH1cdVYqrrgoE85cmKHjnB fH7Y3ug/nj9oKbcuikI8qRgVqrhFjixG8olTk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=scvE+gGToU75Ph7z2VtTS/27IR96HYqWRcC+JLPySkbZCUehLEc/eplysSvd7Nlnsx g33MQ+22lwJiRg35Rn6FDNDiyTDTnr/PkL2Z8o+2wJVjjJXd9evN7twfwKBQs5wRVWRl yEkROMHDonmvwV/C4af1qRsC5b08NBRPEAY+I= Received: by 10.229.183.135 with SMTP id cg7mr13499272qcb.38.1294160694581; Tue, 04 Jan 2011 09:04:54 -0800 (PST) MIME-Version: 1.0 Received: by 10.229.98.203 with HTTP; Tue, 4 Jan 2011 09:04:34 -0800 (PST) In-Reply-To: References: <4D23353C.8020803@gmail.com> From: Jean Krivine Date: Tue, 4 Jan 2011 18:04:34 +0100 Message-ID: To: =?ISO-8859-1?Q?Daniel_B=FCnzli?= Cc: caml-list@inria.fr Content-Type: multipart/alternative; boundary=0016364d2c917b97e8049908445c Subject: Re: [Caml-list] Array.make exception and parser --0016364d2c917b97e8049908445c Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Tue, Jan 4, 2011 at 4:31 PM, Daniel B=FCnzli wrote: > That's not the bug. The Invalid_argument exception is never supposed > to be caught, it denotes a programming error from the client of the > module. > > The bug lies in calling Array.make with a value larger than > Sys.max_array_length. > > Agree, but here I am never calling Array.make so ocaml is "internally" calling array.make with a wrong argument. So the bug is not really mine. An easy "patch" would be to define a Parsing.Overflow exception to throw whenever the function grow_stack() fails... J --0016364d2c917b97e8049908445c Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Tue, Jan 4, 2011 at 4:31 PM, Daniel B=FCnzli <daniel.buenzli@erratique.ch&g= t; wrote:
=A0
That's not the bug. The Invalid_argument exception is never supposed
to be caught, it denotes a programming error from the client of the
module.

The bug lies in calling Array.make with a value larger than
Sys.max_array_length.


Agree, but here I am never calling Array.make so ocaml= is "internally" calling array.make with a wrong argument. So the= bug is not really mine. An easy "patch" would be to define a Par= sing.Overflow exception to throw whenever the function grow_stack() fails..= .

J
--0016364d2c917b97e8049908445c--