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.

classification
Title: pegen (PEP 617): bug in error handling
Type: Stage: resolved
Components: Interpreter Core Versions: Python 3.9
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: gvanrossum, lys.nikolaou, pablogsal, vstinner
Priority: normal Keywords: patch

Created on 2020-05-07 23:48 by vstinner, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 19986 merged pablogsal, 2020-05-08 00:36
Messages (4)
msg368391 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-05-07 23:48
autopep8 test suite does crash on Python 3.9.0a6. The bug can be reproduced with:

Python 3.9.0a6+ (heads/master:b7a78ca74a, May  8 2020, 01:46:01) 
[GCC 10.0.1 20200430 (Red Hat 10.0.1-0.14)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> compile('"\\xhh" \\',  '<string>', 'exec', dont_inherit=True)
python: Objects/typeobject.c:984: type_call: Assertion `!_PyErr_Occurred(tstate)' failed.
 Abandon (core dumped)

It seems like p->error_condition should be checked more often in Parser/pegen/parse.c.
msg368392 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-05-07 23:49
Workaround: use python3.9 -X oldparser.
msg368396 - (view) Author: Lysandros Nikolaou (lys.nikolaou) * (Python committer) Date: 2020-05-08 00:37
That's because we're not checking for errors after a loop is done. Pushing a fix.
msg368408 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2020-05-08 02:38
New changeset db9163ceef31ba00ccb23226917f9c8e9142a0b8 by Pablo Galindo in branch 'master':
bpo-40555: Check for p->error_indicator in loop rules after the main loop is done (GH-19986)
https://github.com/python/cpython/commit/db9163ceef31ba00ccb23226917f9c8e9142a0b8
History
Date User Action Args
2022-04-11 14:59:30adminsetgithub: 84735
2020-05-08 02:39:00pablogsalsetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2020-05-08 02:38:48pablogsalsetmessages: + msg368408
2020-05-08 00:37:28lys.nikolaousetmessages: + msg368396
2020-05-08 00:36:23pablogsalsetkeywords: + patch
stage: patch review
pull_requests: + pull_request19302
2020-05-07 23:49:46vstinnersetmessages: + msg368392
2020-05-07 23:48:56vstinnercreate