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

2011-05-07 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- versions: -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12017 ___ ___ Python-bugs-list

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

2011-05-07 Thread Roundup Robot
Roundup Robot devnull@devnull 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

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

2011-05-07 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com 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-06 Thread ivank
New submission from ivank b...@ludios.org: 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

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

2011-05-06 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- components: +Extension Modules -Library (Lib) nosy: +ezio.melotti stage: - test needed versions: +Python 3.1, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org

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

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

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

2011-05-06 Thread Alex Gaynor
Alex Gaynor alex.gay...@gmail.com added the comment: Why not use Py_EnterRecursiveCall? -- nosy: +alex ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12017 ___

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

2011-05-06 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +barry priority: normal - high stage: test needed - needs patch versions: +Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12017

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

2011-05-06 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- assignee: - ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12017 ___ ___

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

2011-05-06 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com 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

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

2011-05-06 Thread Barry A. Warsaw
Barry A. Warsaw ba...@python.org 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 Barry A. Warsaw
Barry A. Warsaw ba...@python.org added the comment: Not applicable to 2.6 after all. -- priority: release blocker - high ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12017 ___