Message135281
Decoding a highly-nested object with json (_speedups enabled) can cause a segfault due to a stack overflow:
# python -c "import json; json.loads('[' * 100000 + '1' + ']' * 100000)"
zsh: segmentation fault python -c "import json; json.loads('[' * 100000 + '1' + ']' * 100000)"
# python -c "import json; json.loads('{\"a\":' * 100000 + '1' + '}' * 100000)"
zsh: segmentation fault python -c "import json; json.loads('{\"a\":' * 100000 + '1' + '}' * 100000)"
simplejson has the same problem:
https://github.com/simplejson/simplejson/pull/11
I've started on a fix (see patch at that URL), but it doesn't support customizing max_depth yet. |
|
Date |
User |
Action |
Args |
2011-05-06 12:25:57 | ivank | set | recipients:
+ ivank |
2011-05-06 12:25:57 | ivank | set | messageid: <1304684757.27.0.182455462298.issue12017@psf.upfronthosting.co.za> |
2011-05-06 12:25:56 | ivank | link | issue12017 messages |
2011-05-06 12:25:55 | ivank | create | |
|