Skip to content

Commit

Permalink
pythongh-111178: fix UBSan failures in Modules/_ctypes (python#129071)
Browse files Browse the repository at this point in the history
This fixes UBSan failures for the following objects:

- `DictRemoverObject` and `StructParamObject`,
- `CDataObject` and `CFieldObject`, and
- `PyCFuncPtrObject` and `PyCArgObject`.

On the default build, we convert the `LOCK_PTR` and `UNLOCK_PTR` macros to
functions with an unused parameter to ease "unused variable" compiler warnings
suppression. Finally, we also remove some redundant casts to `PyObject *`.
  • Loading branch information
picnixz authored Jan 21, 2025
1 parent 36f341c commit fafc618
Show file tree
Hide file tree
Showing 4 changed files with 151 additions and 114 deletions.
Loading

0 comments on commit fafc618

Please sign in to comment.