Return-Path: Delivered-To: apmail-incubator-couchdb-dev-archive@locus.apache.org Received: (qmail 98296 invoked from network); 9 Sep 2008 01:10:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Sep 2008 01:10:16 -0000 Received: (qmail 11182 invoked by uid 500); 9 Sep 2008 01:10:13 -0000 Delivered-To: apmail-incubator-couchdb-dev-archive@incubator.apache.org Received: (qmail 11066 invoked by uid 500); 9 Sep 2008 01:10:13 -0000 Mailing-List: contact couchdb-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: couchdb-dev@incubator.apache.org Delivered-To: mailing list couchdb-dev@incubator.apache.org Received: (qmail 11055 invoked by uid 99); 9 Sep 2008 01:10:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Sep 2008 18:10:13 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Sep 2008 01:09:12 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 6BAD2234C1D4 for ; Mon, 8 Sep 2008 18:09:44 -0700 (PDT) Message-ID: <1278143135.1220922584440.JavaMail.jira@brutus> Date: Mon, 8 Sep 2008 18:09:44 -0700 (PDT) From: "Chris Anderson (JIRA)" To: couchdb-dev@incubator.apache.org Subject: [jira] Updated: (COUCHDB-118) PATCH JSON Regression - CouchDB crash on rendering very large integers In-Reply-To: <541450388.1220922464353.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/COUCHDB-118?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Chris Anderson updated COUCHDB-118: ----------------------------------- Attachment: huge_int_fix.diff > PATCH JSON Regression - CouchDB crash on rendering very large integers > ---------------------------------------------------------------------- > > Key: COUCHDB-118 > URL: https://issues.apache.org/jira/browse/COUCHDB-118 > Project: CouchDB > Issue Type: Bug > Components: Database Core > Affects Versions: 0.9 > Reporter: Chris Anderson > Attachments: huge_int_bug_test.rb, huge_int_fix.diff > > > Creating documents with gigantic integers works fine, but rendering them causes a crash as mochijson2 tries to call float(I) and Erlang is not capable of handling it. There's nothing in the JSON spec[1] to suggest that huge integers must be rendered as float, so I removed that guard from mochijson2. This fixes the bug. > I included no Futon tests because the numbers we're dealing with are too large to be managed by Javascript. However, I will attach a Ruby test that shows the bug. It is worth noting that the Ruby test passes on old (cjson) versions of CouchDB. > [1] http://www.ietf.org/rfc/rfc4627.txt?number=4627 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.