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.
Created on 2015年10月17日 02:11 by Evan Hubinger, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Messages (4) | |||
|---|---|---|---|
| msg253112 - (view) | Author: Evan Hubinger (Evan Hubinger) * | Date: 2015年10月17日 02:11 | |
The code import itertools it = itertools.chain.from_iterable((f() for f in [lambda: it])) list(it) definitely segfaults on Python 2.6, 2.7, 3.3, and 3.4, and probably segfaults on other versions as well. The code is clearly incorrect in that the lambda references the variable being defined, but it seems like it should raise an error instead of segfaulting. |
|||
| msg253119 - (view) | Author: Josh Rosenberg (josh.r) * (Python triager) | Date: 2015年10月17日 04:46 | |
Also crashes in 3.5.0 (on Windows 7, with 64 bit build). |
|||
| msg253120 - (view) | Author: Raymond Hettinger (rhettinger) * (Python committer) | Date: 2015年10月17日 05:11 | |
This is a duplicate of Issue #14010. This issue runs deep and isn't itertools specific. Running infinite chains of iterators pushes a number of CPython internals past their limits. The best solutions are hard (monitoring the C-stack or fixing every possible fault at the fracture point). The simplest solution (adding recursion count tracking to every possible iteration)is very heavy-handed and would slow-down all of Python in order to spare exotic cases that don't seem to arise in practice. |
|||
| msg253123 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2015年10月17日 06:57 | |
Actually this issue an exact duplicate of issue22911 that is a duplicate of issue14010. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:22 | admin | set | github: 69615 |
| 2015年10月17日 17:17:52 | zach.ware | set | stage: resolved |
| 2015年10月17日 06:58:28 | serhiy.storchaka | set | superseder: deeply nested itertools objects segfault |
| 2015年10月17日 06:57:29 | serhiy.storchaka | set | nosy:
+ serhiy.storchaka messages: + msg253123 |
| 2015年10月17日 05:11:29 | rhettinger | set | status: open -> closed resolution: duplicate messages: + msg253120 |
| 2015年10月17日 04:46:43 | josh.r | set | nosy:
+ josh.r messages: + msg253119 |
| 2015年10月17日 03:00:15 | zach.ware | set | assignee: rhettinger nosy: + rhettinger components: + Extension Modules versions: + Python 3.5, Python 3.6, - Python 3.2, Python 3.3 |
| 2015年10月17日 02:11:53 | Evan Hubinger | create | |