[issue12017] Decoding a highly-nested object with json (_speedups enabled) causes segfault

2011-05-07 Thread Ezio Melotti
Ezio Melotti added the comment: Fixed, thanks Ivan for the report and Alex for suggesting Py_EnterRecursiveCall! -- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed ___ Python tracker

[issue12017] Decoding a highly-nested object with json (_speedups enabled) causes segfault

2011-05-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6fa20e360e5e by Ezio Melotti in branch '2.7': #12017: Fix segfault in json.loads() while decoding highly-nested objects using the C accelerations. http://hg.python.org/cpython/rev/6fa20e360e5e New changeset 61164d09337e by Ezio Melotti in branch '

[issue12017] Decoding a highly-nested object with json (_speedups enabled) causes segfault

2011-05-07 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- versions: -Python 2.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue12017] Decoding a highly-nested object with json (_speedups enabled) causes segfault

2011-05-06 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Not applicable to 2.6 after all. -- priority: release blocker -> high ___ Python tracker ___ ___ P

[issue12017] Decoding a highly-nested object with json (_speedups enabled) causes segfault

2011-05-06 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Thanks for the patch. I'll apply this to 2.6svn for the 2.6.7rc1 release today. Feel free to apply this to 2.6hg and forward port it to the relevant releases. -- ___ Python tracker

[issue12017] Decoding a highly-nested object with json (_speedups enabled) causes segfault

2011-05-06 Thread Ezio Melotti
Ezio Melotti added the comment: 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

[issue12017] Decoding a highly-nested object with json (_speedups enabled) causes segfault

2011-05-06 Thread Ezio Melotti
Changes by Ezio Melotti : -- assignee: -> ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://

[issue12017] Decoding a highly-nested object with json (_speedups enabled) causes segfault

2011-05-06 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +barry priority: normal -> high stage: test needed -> needs patch versions: +Python 2.6 ___ Python tracker ___ __

[issue12017] Decoding a highly-nested object with json (_speedups enabled) causes segfault

2011-05-06 Thread Alex Gaynor
Alex Gaynor added the comment: Why not use Py_EnterRecursiveCall? -- nosy: +alex ___ Python tracker ___ ___ Python-bugs-list mailing

[issue12017] Decoding a highly-nested object with json (_speedups enabled) causes segfault

2011-05-06 Thread ivank
ivank added the comment: any opinions here on what the default max_depth should be? is there any safe number? I'm curious as to how many C stack frames I can use after reaching the Python recursion limit and what ulimit -s looks like on every platform http://hg.python.org/cpython/file/tip/

[issue12017] Decoding a highly-nested object with json (_speedups enabled) causes segfault

2011-05-06 Thread Ezio Melotti
Changes by Ezio Melotti : -- components: +Extension Modules -Library (Lib) nosy: +ezio.melotti stage: -> test needed versions: +Python 3.1, Python 3.2, Python 3.3 ___ Python tracker ___

[issue12017] Decoding a highly-nested object with json (_speedups enabled) causes segfault

2011-05-06 Thread ivank
New submission from ivank : Decoding a highly-nested object with json (_speedups enabled) can cause a segfault due to a stack overflow: # python -c "import json; json.loads('[' * 10 + '1' + ']' * 10)" zsh: segmentation fault python -c "import json; json.loads('[' * 10 + '1' + ']'