-
-
Notifications
You must be signed in to change notification settings - Fork 30.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gh-111178: Avoid calling functions from incompatible pointer types in descrobject.c #112861
Merged
Commits on Dec 8, 2023
-
Objects/descrobject.c:1913:5: warning: cast from 'void (*)(mappingproxyobject *)' to 'destructor' (aka 'void (*)(struct _object *)') converts to incompatible function type [-Wcast-function-type-strict] 1913 | (destructor)mappingproxy_dealloc, /* tp_dealloc */ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Example UBSan error: 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
Configuration menu - View commit details
-
Copy full SHA for e9c0f5f - Browse repository at this point
Copy the full SHA e9c0f5fView commit details -
Objects/descrobject.c:808:5: warning: cast from 'PyObject *(*)(PyMemberDescrObject *, PyObject *, PyObject *)' (aka 'struct _object *(*)(PyMemberDescrObject *, struct _object *, struct _object *)') to 'descrgetfunc' (aka 'struct _object *(*)(struct _object *, struct _object *, struct _object *)') converts to incompatible function type [-Wcast-function-type-strict] 808 | (descrgetfunc)member_get, /* tp_descr_get */ | ^~~~~~~~~~~~~~~~~~~~~~~~ Objects/descrobject.c:809:5: warning: cast from 'int (*)(PyMemberDescrObject *, PyObject *, PyObject *)' (aka 'int (*)(PyMemberDescrObject *, struct _object *, struct _object *)') to 'descrsetfunc' (aka 'int (*)(struct _object *, struct _object *, struct _object *)') converts to incompatible function type [-Wcast-function-type-strict] 809 | (descrsetfunc)member_set, /* tp_descr_set */ | ^~~~~~~~~~~~~~~~~~~~~~~~ Example UBSan error: Objects/object.c:1682:19: runtime error: call to function member_set through pointer to incorrect function type 'int (*)(struct _object *, struct _object *, struct _object *)' descrobject.c:227: note: member_set defined here SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior Objects/object.c:1682:19 in Objects/object.c:1564:19: runtime error: call to function member_get through pointer to incorrect function type 'struct _object *(*)(struct _object *, struct _object *, struct _object *)' descrobject.c:160: note: member_get defined here SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior Objects/object.c:1564:19 in
Configuration menu - View commit details
-
Copy full SHA for 31f6c07 - Browse repository at this point
Copy the full SHA 31f6c07View commit details -
Example compiler warning: Objects/descrobject.c:703:5: warning: cast from 'void (*)(PyDescrObject *)' to 'destructor' (aka 'void (*)(struct _object *)') converts to incompatible function type [-Wcast-function-type-strict] 703 | (destructor)descr_dealloc, /* tp_dealloc */ | ^~~~~~~~~~~~~~~~~~~~~~~~~ Example UBSan error: Objects/object.c:2857:5: runtime error: call to function descr_dealloc through pointer to incorrect function type 'void (*)(struct _object *)' descrobject.c:23: note: descr_dealloc defined here SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior Objects/object.c:2857:5 in
Configuration menu - View commit details
-
Copy full SHA for b950d1a - Browse repository at this point
Copy the full SHA b950d1aView commit details -
Objects/descrobject.c:771:5: warning: cast from 'PyObject *(*)(PyMethodDescrObject *, PyObject *, PyObject *)' (aka 'struct _object *(*)(PyMethodDescrObject *, struct _object *, struct _object *)') to 'descrgetfunc' (aka 'struct _object *(*)(struct _object *, struct _object *, struct _object *)') converts to incompatible function type [-Wcast-function-type-strict] 771 | (descrgetfunc)classmethod_get, /* tp_descr_get */ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Example UBSan error: Objects/typeobject.c:10293:24: runtime error: call to function classmethod_get through pointer to incorrect function type 'struct _object *(*)(struct _object *, struct _object *, struct _object *)' descrobject.c:94: note: classmethod_get defined here SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior Objects/typeobject.c:10293:24 in
Configuration menu - View commit details
-
Copy full SHA for 505a00c - Browse repository at this point
Copy the full SHA 505a00cView commit details -
Objects/descrobject.c:845:5: warning: cast from 'PyObject *(*)(PyGetSetDescrObject *, PyObject *, PyObject *)' (aka 'struct _object *(*)(PyGetSetDescrObject *, struct _object *, struct _object *)') to 'descrgetfunc' (aka 'struct _object *(*)(struct _object *, struct _object *, struct _object *)') converts to incompatible function type [-Wcast-function-type-strict] 845 | (descrgetfunc)getset_get, /* tp_descr_get */ | ^~~~~~~~~~~~~~~~~~~~~~~~ Objects/descrobject.c:846:5: warning: cast from 'int (*)(PyGetSetDescrObject *, PyObject *, PyObject *)' (aka 'int (*)(PyGetSetDescrObject *, struct _object *, struct _object *)') to 'descrsetfunc' (aka 'int (*)(struct _object *, struct _object *, struct _object *)') converts to incompatible function type [-Wcast-function-type-strict] 846 | (descrsetfunc)getset_set, /* tp_descr_set */ | ^~~~~~~~~~~~~~~~~~~~~~~~ Example UBSan error: Objects/typeobject.c:4861:19: runtime error: call to function getset_get through pointer to incorrect function type 'struct _object *(*)(struct _object *, struct _object *, struct _object *)' descrobject.c:180: note: getset_get defined here SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior Objects/typeobject.c:4861:19 in
Configuration menu - View commit details
-
Copy full SHA for 2e1b409 - Browse repository at this point
Copy the full SHA 2e1b409View commit details -
Objects/descrobject.c:739:5: warning: cast from 'PyObject *(*)(PyMethodDescrObject *, PyObject *, PyObject *)' (aka 'struct _object *(*)(PyMethodDescrObject *, struct _object *, struct _object *)') to 'descrgetfunc' (aka 'struct _object *(*)(struct _object *, struct _object *, struct _object *)') converts to incompatible function type [-Wcast-function-type-strict] 739 | (descrgetfunc)method_get, /* tp_descr_get */ | ^~~~~~~~~~~~~~~~~~~~~~~~ Example UBSan error: Objects/object.c:1621:15: runtime error: call to function method_get through pointer to incorrect function type 'struct _object *(*)(struct _object *, struct _object *, struct _object *)' descrobject.c:138: note: method_get defined here SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior Objects/object.c:1621:15 in
Configuration menu - View commit details
-
Copy full SHA for b82d048 - Browse repository at this point
Copy the full SHA b82d048View commit details -
Configuration menu - View commit details
-
Copy full SHA for eb6c22e - Browse repository at this point
Copy the full SHA eb6c22eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 60c0d7a - Browse repository at this point
Copy the full SHA 60c0d7aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1de5a1a - Browse repository at this point
Copy the full SHA 1de5a1aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8b57573 - Browse repository at this point
Copy the full SHA 8b57573View commit details -
Configuration menu - View commit details
-
Copy full SHA for d2f06e6 - Browse repository at this point
Copy the full SHA d2f06e6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4cd2e6d - Browse repository at this point
Copy the full SHA 4cd2e6dView commit details -
Configuration menu - View commit details
-
Copy full SHA for f32c9e0 - Browse repository at this point
Copy the full SHA f32c9e0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 83df0df - Browse repository at this point
Copy the full SHA 83df0dfView commit details -
Configuration menu - View commit details
-
Copy full SHA for a4c7f17 - Browse repository at this point
Copy the full SHA a4c7f17View commit details -
Configuration menu - View commit details
-
Copy full SHA for be0fb74 - Browse repository at this point
Copy the full SHA be0fb74View commit details -
Configuration menu - View commit details
-
Copy full SHA for 356c2fe - Browse repository at this point
Copy the full SHA 356c2feView commit details -
Configuration menu - View commit details
-
Copy full SHA for ec4ca04 - Browse repository at this point
Copy the full SHA ec4ca04View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9ebb68f - Browse repository at this point
Copy the full SHA 9ebb68fView commit details -
Configuration menu - View commit details
-
Copy full SHA for de99189 - Browse repository at this point
Copy the full SHA de99189View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9b43a8d - Browse repository at this point
Copy the full SHA 9b43a8dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 32b8dfe - Browse repository at this point
Copy the full SHA 32b8dfeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 78419d6 - Browse repository at this point
Copy the full SHA 78419d6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 97d3ee8 - Browse repository at this point
Copy the full SHA 97d3ee8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 30cd173 - Browse repository at this point
Copy the full SHA 30cd173View commit details -
Configuration menu - View commit details
-
Copy full SHA for fcce565 - Browse repository at this point
Copy the full SHA fcce565View commit details -
Configuration menu - View commit details
-
Copy full SHA for 776acd7 - Browse repository at this point
Copy the full SHA 776acd7View commit details -
Configuration menu - View commit details
-
Copy full SHA for f4dfb12 - Browse repository at this point
Copy the full SHA f4dfb12View commit details -
Configuration menu - View commit details
-
Copy full SHA for 80da821 - Browse repository at this point
Copy the full SHA 80da821View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7b903ea - Browse repository at this point
Copy the full SHA 7b903eaView commit details -
Configuration menu - View commit details
-
Copy full SHA for d646a9d - Browse repository at this point
Copy the full SHA d646a9dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 75a4980 - Browse repository at this point
Copy the full SHA 75a4980View commit details -
Configuration menu - View commit details
-
Copy full SHA for e96377d - Browse repository at this point
Copy the full SHA e96377dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0002cba - Browse repository at this point
Copy the full SHA 0002cbaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 057c059 - Browse repository at this point
Copy the full SHA 057c059View commit details -
Configuration menu - View commit details
-
Copy full SHA for 57224d0 - Browse repository at this point
Copy the full SHA 57224d0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 071d2bc - Browse repository at this point
Copy the full SHA 071d2bcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 65f0a90 - Browse repository at this point
Copy the full SHA 65f0a90View commit details -
Configuration menu - View commit details
-
Copy full SHA for 385dbfd - Browse repository at this point
Copy the full SHA 385dbfdView commit details -
Configuration menu - View commit details
-
Copy full SHA for a0e0ae0 - Browse repository at this point
Copy the full SHA a0e0ae0View commit details -
Configuration menu - View commit details
-
Copy full SHA for ff534a1 - Browse repository at this point
Copy the full SHA ff534a1View commit details -
Configuration menu - View commit details
-
Copy full SHA for ae28dc1 - Browse repository at this point
Copy the full SHA ae28dc1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 547cbc0 - Browse repository at this point
Copy the full SHA 547cbc0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6360a46 - Browse repository at this point
Copy the full SHA 6360a46View commit details -
Configuration menu - View commit details
-
Copy full SHA for e823bed - Browse repository at this point
Copy the full SHA e823bedView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6c15c76 - Browse repository at this point
Copy the full SHA 6c15c76View commit details -
Configuration menu - View commit details
-
Copy full SHA for 238724f - Browse repository at this point
Copy the full SHA 238724fView commit details -
Configuration menu - View commit details
-
Copy full SHA for cb6f751 - Browse repository at this point
Copy the full SHA cb6f751View commit details
Commits on Dec 9, 2023
-
Configuration menu - View commit details
-
Copy full SHA for dd64280 - Browse repository at this point
Copy the full SHA dd64280View commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.