homepage

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: Incorrect return codes in compile.c
Type: behavior Stage: resolved
Components: Interpreter Core Versions: Python 3.6, Python 3.5, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: serhiy.storchaka Nosy List: Demur Rumed, benjamin.peterson, python-dev, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2016年06月12日 15:34 by serhiy.storchaka, last changed 2022年04月11日 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
compile_rc-3.6_2.patch serhiy.storchaka, 2016年06月14日 19:08 Patch for 3.6 review
compile_rc-3.5.patch serhiy.storchaka, 2016年06月14日 19:08 Patch for 3.5 review
Messages (4)
msg268390 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016年06月12日 15:34
Macros ADDOP, ADDOP_I, ADDOP_O, etc are used in Python/compile.c for emitting instructions. They make functions where they are used returning 0 on error. But some functions return -1 on error and non-negative integer on success. 0 is legitimate value. In case of error in the ADDOP* macro, the error is not correctly detected in the outer function.
Here is a patch that fixes this issue in 3.6. 3.5 and 2.7 need different patches.
msg268605 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2016年06月15日 06:28
lgtm
msg268623 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016年06月15日 17:09
New changeset 51fe72949245 by Serhiy Storchaka in branch '3.5':
Issue #27301: Fixed incorrect return codes for errors in compile.c.
https://hg.python.org/cpython/rev/51fe72949245
New changeset c388b0751290 by Serhiy Storchaka in branch '2.7':
Issue #27301: Fixed incorrect return code for error in compile.c.
https://hg.python.org/cpython/rev/c388b0751290
New changeset 2b3cd7e4b2b6 by Serhiy Storchaka in branch 'default':
Issue #27301: Fixed incorrect return codes for errors in compile.c.
https://hg.python.org/cpython/rev/2b3cd7e4b2b6 
msg268624 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016年06月15日 17:10
Thank you Benjamin.
2.7 needed to fix just one line.
History
Date User Action Args
2022年04月11日 14:58:32adminsetgithub: 71488
2016年06月15日 17:10:29serhiy.storchakasetstatus: open -> closed
resolution: fixed
messages: + msg268624

stage: patch review -> resolved
2016年06月15日 17:09:12python-devsetnosy: + python-dev
messages: + msg268623
2016年06月15日 06:28:45benjamin.petersonsetnosy: + benjamin.peterson
messages: + msg268605
2016年06月14日 19:08:59serhiy.storchakasetfiles: - compile_rc-3.6.patch
2016年06月14日 19:08:39serhiy.storchakasetfiles: + compile_rc-3.5.patch
2016年06月14日 19:08:20serhiy.storchakasetfiles: + compile_rc-3.6_2.patch
2016年06月12日 15:34:27serhiy.storchakasetfiles: + compile_rc-3.6.patch
keywords: + patch
2016年06月12日 15:34:08serhiy.storchakacreate

AltStyle によって変換されたページ (->オリジナル) /