This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients vstinner
Date 2008-08-20.22:58:43
SpamBayes Score 1.04187e-09
Marked as misclassified No
Message-id <>
_json module of python 3.0 has some bugs.

(a) [_json.c] raise_errmsg() calls json.decoder.errmsg() from Python 
module, but this function may fails. If it fails, error should be be 
set to NULL. Example:

>>> import _json
>>> _json.scanstring(b"xxx", 1, "xxx")
Erreur de segmentation (core dumped)

=> json.decoder.errmsg() calls linecol() which raise an error on 

(b) [_json.c] py_encode_basestring_ascii() calls PyBytes_Check(rval) 
but rval can be NULL if ascii_escape_str() or ascii_escape_unicode() 
fails. Example:

>>> import _json
>>> _json.encode_basestring_ascii(b"xx\xff")
Erreur de segmentation (core dumped)

(c) [Lib/json/] linecol() doesn't support bytes, but it's 
called with bytes argument: see point (a). For an example, see point 
Date User Action Args
2008-08-20 22:58:44vstinnersetrecipients: + vstinner
2008-08-20 22:58:44vstinnersetmessageid: <>
2008-08-20 22:58:44vstinnerlinkissue3623 messages
2008-08-20 22:58:43vstinnercreate