Message135315
Attached patch fixes the issues. The patch includes 6 tests that caused a segfault and that now raise a "RuntimeError: maximum recursion depth exceeded" error, matching the behavior of the Python version.
The recursion happen because scan_once_str/unicode might call _parse_object_str/unicode (for objects/dicts) and _parse_array_str/unicode (for arrays/lists), and these functions might call scan_once_str again for their inner elements.
To fix the problem I added Py_Enter/LeaveRecursiveCall around the calls to _parse_object_str and _parse_array_str in scan_once_str/unicode.
For some reason the message raised with json.loads('{"a":' * 100000 + '1' + '}' * 100000), is a generic "maximum recursion depth exceeded while calling a Python object", but that's probably not too important.
The other messages work fine. |
|
Date |
User |
Action |
Args |
2011-05-06 16:11:02 | ezio.melotti | set | recipients:
+ ezio.melotti, barry, georg.brandl, benjamin.peterson, alex, ivank |
2011-05-06 16:11:02 | ezio.melotti | set | messageid: <1304698262.37.0.537087217829.issue12017@psf.upfronthosting.co.za> |
2011-05-06 16:11:00 | ezio.melotti | link | issue12017 messages |
2011-05-06 16:11:00 | ezio.melotti | create | |
|