Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue34441

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:NULL dereference when issubclass() is called on a class with bogus __subclasses__
Type:crashStage:resolved
Components:Extension ModulesVersions:Python 3.8, Python 3.7
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To:Nosy List: berker.peksag, izbyshev, levkivskyi, methane, miss-islington, serhiy.storchaka
Priority:normalKeywords:patch

Created on2018-08-20 13:41 byizbyshev, last changed2022-04-11 14:59 byadmin. This issue is nowclosed.

Pull Requests
URLStatusLinkedEdit
PR 8835mergedizbyshev,2018-08-20 14:05
PR 8840mergedmiss-islington,2018-08-20 20:04
Messages (3)
msg323789 -(view)Author: Alexey Izbyshev (izbyshev)*(Python triager)Date: 2018-08-20 13:41
>>> from abc import ABCMeta>>> class S(metaclass=ABCMeta):...   __subclasses__ = None... >>> issubclass(int, S)Segmentation fault (core dumped)This is the result of missing NULL check for 'subclasses' in _abc__abc_subclasscheck_impl (Modules/_abc.c):    /* 6. Check if it's a subclass of a subclass (recursive). */    subclasses = PyObject_CallMethod(self, "__subclasses__", NULL);    if (!PyList_Check(subclasses)) {        PyErr_SetString(PyExc_TypeError, "__subclasses__() must return a list");        goto end;    }Reported by Svace static analyzer.
msg323810 -(view)Author: Berker Peksag (berker.peksag)*(Python committer)Date: 2018-08-20 20:04
New changesetcdbf50cba1664f72ae6621a89c324a32fea70377 by Berker Peksag (Alexey Izbyshev) in branch 'master':bpo-34441: Fix ABC.__subclasscheck__ crash on classes with invalid __subclasses__ (GH-8835)https://github.com/python/cpython/commit/cdbf50cba1664f72ae6621a89c324a32fea70377
msg323811 -(view)Author: miss-islington (miss-islington)Date: 2018-08-20 20:42
New changesetd1f0ccc7e65ef7abeab779f5d0aca2f18eb9b2a4 by Miss Islington (bot) in branch '3.7':bpo-34441: Fix ABC.__subclasscheck__ crash on classes with invalid __subclasses__ (GH-8835)https://github.com/python/cpython/commit/d1f0ccc7e65ef7abeab779f5d0aca2f18eb9b2a4
History
DateUserActionArgs
2022-04-11 14:59:04adminsetgithub: 78622
2018-08-20 20:47:06izbyshevsetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2018-08-20 20:42:23miss-islingtonsetnosy: +miss-islington
messages: +msg323811
2018-08-20 20:04:40miss-islingtonsetpull_requests: +pull_request8314
2018-08-20 20:04:23berker.peksagsetnosy: +berker.peksag
messages: +msg323810
2018-08-20 14:05:21izbyshevsetkeywords: +patch
stage: patch review
pull_requests: +pull_request8310
2018-08-20 13:41:11izbyshevcreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp