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
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.