
This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
Created on2017-06-18 10:33 byxdegaye, last changed2022-04-11 14:58 byadmin. This issue is nowclosed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| infinite_loop.patch | xdegaye,2017-06-18 10:33 | |||
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 4160 | merged | xdegaye,2017-10-28 20:23 | |
| PR 4379 | merged | xdegaye,2017-11-12 16:08 | |
| Messages (9) | |||
|---|---|---|---|
| msg296267 -(view) | Author: Xavier de Gaye (xdegaye)*![]() | Date: 2017-06-18 10:33 | |
To reproduce the problem, apply the nomemory_allocator.patch fromissue 30695 and run the following two statements that must be interrupted with ^C:$ ./python -q>>> import _testcapi>>> _testcapi.set_nomemory_allocator()sys.excepthook is missing^Cpython:Objects/call.c:785: PyEval_CallObjectWithKeywords: Assertion `!PyErr_Occurred()' failed.Aborted (core dumped)The attached patch fixes this problem.No PR for the moment: this patch and nomemory_allocator.patch are needed to demonstrate other issues. | |||
| msg296322 -(view) | Author: Xavier de Gaye (xdegaye)*![]() | Date: 2017-06-19 12:29 | |
The patch is far too simplistic. With this patch an exception kills the interactive loop, for example:$ ./python -q>>> xTraceback (most recent call last): File "<stdin>", line 1, in <module>NameError: name 'x' is not defined$ | |||
| msg296324 -(view) | Author: STINNER Victor (vstinner)*![]() | Date: 2017-06-19 12:48 | |
See also my old issue#8070 opened 7 years ago :-) | |||
| msg306118 -(view) | Author: Xavier de Gaye (xdegaye)*![]() | Date: 2017-11-12 15:50 | |
New changesete0582a37c8d1776a2fd4968e9216f3a05f780276 by xdegaye in branch 'master':bpo-30696: Fix the REPL looping endlessly when no memory (GH-4160)https://github.com/python/cpython/commit/e0582a37c8d1776a2fd4968e9216f3a05f780276 | |||
| msg306120 -(view) | Author: Xavier de Gaye (xdegaye)*![]() | Date: 2017-11-12 16:33 | |
New changesetea5b545e38b3fec7ff29276b5cd59dec583ebf34 by xdegaye in branch '3.6':[3.6]bpo-30696: Fix the REPL looping endlessly when no memory (GH-4160). (#4379)https://github.com/python/cpython/commit/ea5b545e38b3fec7ff29276b5cd59dec583ebf34 | |||
| msg306151 -(view) | Author: STINNER Victor (vstinner)*![]() | Date: 2017-11-13 11:04 | |
Thanks for fixing this very old bug!What about Python 2.7? | |||
| msg306152 -(view) | Author: Xavier de Gaye (xdegaye)*![]() | Date: 2017-11-13 11:55 | |
> What about Python 2.7?_testcapi.set_nomemory() does not exist on Pyhton 2.7 so the changes cannot be tested. Applying the changes to PyRun_InteractiveLoopFlags() in 2.7 looks rather straightforward but there are too many differences in PyRun_InteractiveOneFlags() between 2.7 and 3.7. | |||
| msg306153 -(view) | Author: Xavier de Gaye (xdegaye)*![]() | Date: 2017-11-13 11:59 | |
Also the existing test coverage of these functions in all the Python versions is very weak. | |||
| msg306155 -(view) | Author: STINNER Victor (vstinner)*![]() | Date: 2017-11-13 12:40 | |
Ok, I understand, thanks for the explanation. | |||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:58:47 | admin | set | github: 74881 |
| 2017-11-13 12:40:12 | vstinner | set | messages: +msg306155 |
| 2017-11-13 11:59:21 | xdegaye | set | messages: +msg306153 |
| 2017-11-13 11:55:53 | xdegaye | set | messages: +msg306152 |
| 2017-11-13 11:04:49 | vstinner | set | messages: +msg306151 |
| 2017-11-12 16:33:59 | xdegaye | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2017-11-12 16:33:18 | xdegaye | set | messages: +msg306120 |
| 2017-11-12 16:08:25 | xdegaye | set | pull_requests: +pull_request4327 |
| 2017-11-12 15:50:52 | xdegaye | set | messages: +msg306118 |
| 2017-10-28 20:32:22 | xdegaye | set | versions: - Python 3.5 |
| 2017-10-28 20:23:10 | xdegaye | set | stage: patch review pull_requests: +pull_request4129 |
| 2017-06-25 09:10:33 | xdegaye | set | pull_requests: -pull_request2416 |
| 2017-06-23 20:31:48 | xdegaye | set | pull_requests: +pull_request2416 |
| 2017-06-23 15:59:34 | xdegaye | set | pull_requests: -pull_request2407 |
| 2017-06-23 15:51:11 | xdegaye | set | pull_requests: +pull_request2407 |
| 2017-06-19 12:48:55 | vstinner | set | messages: +msg296324 |
| 2017-06-19 12:29:28 | xdegaye | set | messages: +msg296322 |
| 2017-06-18 13:53:56 | xdegaye | set | versions: + Python 3.5, Python 3.6 |
| 2017-06-18 10:33:04 | xdegaye | create | |