You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Sam Bisbee (Closed) (JIRA)" <ji...@apache.org> on 2012/02/21 23:56:48 UTC

[jira] [Closed] (COUCHDB-118) PATCH JSON Regression - CouchDB crash on rendering very large integers

     [ https://issues.apache.org/jira/browse/COUCHDB-118?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sam Bisbee closed COUCHDB-118.
------------------------------


Resolved for a while. Closing.
                
> 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.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira