]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-111178: Avoid calling functions from incompatible pointer types in descrobject...
authorChristopher Chavez <chrischavez@gmx.us>
Tue, 2 Jan 2024 14:03:39 +0000 (08:03 -0600)
committerGitHub <noreply@github.com>
Tue, 2 Jan 2024 14:03:39 +0000 (15:03 +0100)
commitacf4cf5ca5ef62407e35609fb365e7dfaa362648
treefc07e7a4a295dc448d88be1ec1e29fe6280f55c2
parent5d36a95e64e30606e8f8e332edf6bde91ac344cf
gh-111178: Avoid calling functions from incompatible pointer types in descrobject.c (GH-112861)

Fix undefined behavior warnings (UBSan  -fsanitize=function), for example:

Python/generated_cases.c.h:3315:13: runtime error: call to function mappingproxy_dealloc through pointer to incorrect function type 'void (*)(struct _object *)'
descrobject.c:1160: note: mappingproxy_dealloc defined here
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior Python/generated_cases.c.h:3315:13 in
Objects/descrobject.c