https://github.com/python/cpython/commit/e89c7f1fc0648a5145b5206149be787f9e06f101
commit: e89c7f1fc0648a5145b5206149be787f9e06f101
branch: 3.14
author: Miss Islington (bot) <[email protected]>
committer: pablogsal <[email protected]>
date: 2025-06-15T22:54:23+02:00
summary:

[3.14] gh-111178: fix UBSan failures for `RemoteUnwinderObject` (GH-135539) 
(#135547)

files:
M Modules/_remote_debugging_module.c

diff --git a/Modules/_remote_debugging_module.c 
b/Modules/_remote_debugging_module.c
index 564eaef621db67..416298d7479df3 100644
--- a/Modules/_remote_debugging_module.c
+++ b/Modules/_remote_debugging_module.c
@@ -214,6 +214,8 @@ typedef struct {
 #endif
 } RemoteUnwinderObject;
 
+#define RemoteUnwinder_CAST(op) ((RemoteUnwinderObject *)(op))
+
 typedef struct
 {
     int lineno;
@@ -2913,8 +2915,9 @@ static PyMethodDef RemoteUnwinder_methods[] = {
 };
 
 static void
-RemoteUnwinder_dealloc(RemoteUnwinderObject *self)
+RemoteUnwinder_dealloc(PyObject *op)
 {
+    RemoteUnwinderObject *self = RemoteUnwinder_CAST(op);
     PyTypeObject *tp = Py_TYPE(self);
     if (self->code_object_cache) {
         _Py_hashtable_destroy(self->code_object_cache);

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to