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=1.7 required=5.0 tests=AWL,HTML_MESSAGE,SPF_NEUTRAL 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 BA9BBBC69 for ; Fri, 30 Mar 2007 02:26:07 +0200 (CEST) Received: from ik-out-1112.google.com (ik-out-1112.google.com [66.249.90.180]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l2U0Q7cw003440 for ; Fri, 30 Mar 2007 02:26:07 +0200 Received: by ik-out-1112.google.com with SMTP id c29so274620ika for ; Thu, 29 Mar 2007 17:26:07 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:references:x-google-sender-auth; b=dfN2sFz65Xs5ZskWFs0QmRM7nkmd69ALDrCcXjD+BIHXpMOMvAgJgaU9Puh/JFj0Ca0eKdStCWCtwbZd2ga6yqcezQx/HRIHLRB+VLEGxGlSyGZxooi5SphW80OdmhXehY3/UB4/pvbGFB+bT0tcoD6DwLzo0jdBz9yoQ/NkzJY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:references:x-google-sender-auth; b=Ojd74NzacjCKMors1EvGKb5YXVekJ5vc+dobVPD7MQp3oXTL+WL0UaqFtHF34W0iUe74DS3woejSI+W924cyISWAkBDCt4sTjabRbS0TBlTLVRZQIGhXpQwXg2erdMlrNLZeIRgeryfa8RxwvhvtgTPr8H5fLvTjSPVrFN4GV0A= Received: by 10.115.76.1 with SMTP id d1mr490789wal.1175214366059; Thu, 29 Mar 2007 17:26:06 -0700 (PDT) Received: by 10.115.55.5 with HTTP; Thu, 29 Mar 2007 17:26:06 -0700 (PDT) Message-ID: <891bd3390703291726ue71cfa6re8d4c3d66520e4d9@mail.gmail.com> Date: Thu, 29 Mar 2007 20:26:06 -0400 From: "Yaron Minsky" Sender: yminsky@gmail.com To: "Oliver Bandel" Subject: Re: [Caml-list] int_of_string bug Cc: caml-list@inria.fr In-Reply-To: <20070329212931.GG6843@first.in-berlin.de> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_55295_4260355.1175214366013" References: <891bd3390703290927o4e1c6bb5gf8f562fedbc70096@mail.gmail.com> <20070329212931.GG6843@first.in-berlin.de> X-Google-Sender-Auth: 1b0d1e367ac89a57 X-Miltered: at discorde with ID 460C591F.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; yaron:01 minsky:01 yminsky:01 bug:01 bandel:01 in-berlin:01 yaron:01 minsky:01 bug:01 lexer:01 bandel:01 beginner's:01 ocaml:01 in-berlin:01 lexer:01 ------=_Part_55295_4260355.1175214366013 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline On 3/29/07, Oliver Bandel wrote: > > On Thu, Mar 29, 2007 at 12:27:05PM -0400, Yaron Minsky wrote: > > So, there's a weird int_of_string bug where positive decimal numbers are > > sometimes read in as negative numbers without error. Here's the bug: > > > > http://caml.inria.fr/mantis/view.php?id=0004210 > > > > This has been marked as "wontfix" in the bug database because apparently > > there's some weird spot in the lexer that depends on the wrong behavior > of > > int_of_string. > [...] > > Oh, that's bad. :( > > But btw. it's also bad that, when overflowing of int occurs, no > exception is thrown. :( That's a problem too, but there is at least a defensible reason for that, which is that it is expensive to get integer overflow to throw an exception. Ciao, > Oliver Bandel > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs > ------=_Part_55295_4260355.1175214366013 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline

On 3/29/07, Oliver Bandel <oliver@first.in-berlin.de> wrote:
On Thu, Mar 29, 2007 at 12:27:05PM -0400, Yaron Minsky wrote:
> So, there's a weird int_of_string bug where positive decimal numbers are
> sometimes read in as negative numbers without error.  Here's the bug:
>
> http://caml.inria.fr/mantis/view.php?id=0004210
>
> This has been marked as "wontfix" in the bug database because apparently
> there's some weird spot in the lexer that depends on the wrong behavior of
> int_of_string.
[...]

Oh, that's bad. :(

But btw. it's also bad that, when overflowing of int occurs, no
exception is thrown. :(

That's a problem too, but there is at least a defensible reason for that, which is that it is expensive to get integer overflow to throw an exception.

Ciao,
   Oliver Bandel

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

------=_Part_55295_4260355.1175214366013--