classification
Title: Unchecked return in Objects/typeobject.c and possible uninitialized variables in cls and new_mro
Type: enhancement Stage: patch review
Components: Library (Lib) Versions:
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: monocle-ai, python-dev
Priority: normal Keywords: patch

Created on 2020-10-14 13:47 by monocle-ai, last changed 2020-10-14 21:42 by monocle-ai.

Pull Requests
URL Status Linked Edit
PR 22695 open python-dev, 2020-10-14 14:29
Messages (1)
msg378615 - (view) Author: Sagar Pant (monocle-ai) * Date: 2020-10-14 13:47
The return value of a function that is potentially used to initialize a local variable is not checked. Therefore, reading the local variable may result in undefined behavior.

Our AI analyzer found that this function is called for a total of 43 times. Out of these 43 times, the return value from the function call is checked at 42 instances. This is the only instance where the code misses to check the return value for success or failure.

Once such correct reference usage found in Python/hamt.c at line 2805 .
History
Date User Action Args
2020-10-14 21:42:21monocle-aisetcomponents: + Library (Lib), - C API
2020-10-14 14:29:21python-devsetkeywords: + patch
nosy: + python-dev

pull_requests: + pull_request21666
stage: patch review
2020-10-14 13:47:28monocle-aicreate