[New-bugs-announce] [issue42034] Unchecked return in Objects/typeobject.c and possible uninitialized variables in cls and new_mro

Sagar Pant report at bugs.python.org
Wed Oct 14 09:47:28 EDT 2020


New submission from Sagar Pant <sagpant at microsoft.com>:

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 .

----------
components: C API
messages: 378615
nosy: sagar
priority: normal
severity: normal
status: open
title: Unchecked return in Objects/typeobject.c and possible uninitialized variables in cls and new_mro
type: enhancement

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42034>
_______________________________________


More information about the New-bugs-announce mailing list