Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue37420

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title:os.sched_setaffinity does not handle errors during iteration.
Type:behaviorStage:resolved
Components:Library (Lib)Versions:Python 3.9
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To:Nosy List: benjamin.peterson, brandtbucher, miss-islington
Priority:normalKeywords:patch

Created on2019-06-26 22:22 bybrandtbucher, last changed2022-04-11 14:59 byadmin. This issue is nowclosed.

Pull Requests
URLStatusLinkedEdit
PR 14414mergedbrandtbucher,2019-06-26 22:22
PR 14425mergedmiss-islington,2019-06-27 16:11
PR 14426mergedmiss-islington,2019-06-27 16:11
Messages (4)
msg346691 -(view)Author: Brandt Bucher (brandtbucher)*(Python committer)Date: 2019-06-26 22:22
This is related tobpo-37417: os.sched_setaffinity doesn't properly handle errors that arise during iteration of the mask argument:Python 3.9.0a0 (heads/master:d52a83a, Jun 26 2019, 15:13:41) [GCC 5.4.0 20160609] on linuxType "help", "copyright", "credits" or "license" for more information.>>> import os>>> bad_iter = map(int, "0X")>>> os.sched_setaffinity(0, bad_iter)ValueError: invalid literal for int() with base 10: 'X'The above exception was the direct cause of the following exception:Traceback (most recent call last):  File "<stdin>", line 1, in <module>SystemError: <built-in function sched_setaffinity> returned a result with an error setIt looks like this bug is also present on all versions of Python 3. I've attached a patch with a fix and a regression test.
msg346751 -(view)Author: Benjamin Peterson (benjamin.peterson)*(Python committer)Date: 2019-06-27 16:11
New changeset45a30af109f69a81576b87ea775863ba12d55316 by Benjamin Peterson (Brandt Bucher) in branch 'master':closesbpo-37420: Handle errors during iteration in os.sched_setaffinity. (GH-14414)https://github.com/python/cpython/commit/45a30af109f69a81576b87ea775863ba12d55316
msg346754 -(view)Author: miss-islington (miss-islington)Date: 2019-06-27 16:30
New changeset65e187239a6feb09840ed9c2ebee51ed151e690d by Miss Islington (bot) in branch '3.7':closesbpo-37420: Handle errors during iteration in os.sched_setaffinity. (GH-14414)https://github.com/python/cpython/commit/65e187239a6feb09840ed9c2ebee51ed151e690d
msg346757 -(view)Author: miss-islington (miss-islington)Date: 2019-06-27 16:45
New changeset6fbed5350c786ab88868925d67f59e19d0ab841c by Miss Islington (bot) in branch '3.8':closesbpo-37420: Handle errors during iteration in os.sched_setaffinity. (GH-14414)https://github.com/python/cpython/commit/6fbed5350c786ab88868925d67f59e19d0ab841c
History
DateUserActionArgs
2022-04-11 14:59:17adminsetgithub: 81601
2019-06-27 16:45:35miss-islingtonsetmessages: +msg346757
2019-06-27 16:30:53miss-islingtonsetnosy: +miss-islington
messages: +msg346754
2019-06-27 16:11:42miss-islingtonsetpull_requests: +pull_request14242
2019-06-27 16:11:22miss-islingtonsetpull_requests: +pull_request14241
2019-06-27 16:11:13benjamin.petersonsetstatus: open -> closed

nosy: +benjamin.peterson
messages: +msg346751

resolution: fixed
stage: patch review -> resolved
2019-06-26 22:22:41brandtbuchersetkeywords: +patch
stage: patch review
pull_requests: +pull_request14226
2019-06-26 22:22:26brandtbuchercreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp