Skip to content

Commit ae5b6a4

Browse files
committed
Address code review
1 parent d0ba9c9 commit ae5b6a4

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

Objects/genobject.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,8 @@ gen_set_name(PyObject *self, PyObject *value, void *Py_UNUSED(ignored))
721721
return -1;
722722
}
723723
Py_BEGIN_CRITICAL_SECTION(self);
724-
// To prevent use-after-free from other threads that reference the gi_name.
724+
// gh-133931: To prevent use-after-free from other threads that reference
725+
// the gi_name.
725726
_PyObject_XSetRefDelayed(&op->gi_name, Py_NewRef(value));
726727
Py_END_CRITICAL_SECTION();
727728
return 0;
@@ -747,7 +748,8 @@ gen_set_qualname(PyObject *self, PyObject *value, void *Py_UNUSED(ignored))
747748
return -1;
748749
}
749750
Py_BEGIN_CRITICAL_SECTION(self);
750-
// To prevent use-after-free from other threads that reference the gi_qualname.
751+
// gh-133931: To prevent use-after-free from other threads that reference
752+
// the gi_qualname.
751753
_PyObject_XSetRefDelayed(&op->gi_qualname, Py_NewRef(value));
752754
Py_END_CRITICAL_SECTION();
753755
return 0;

Objects/typeobject.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3967,7 +3967,8 @@ _PyObject_SetDict(PyObject *obj, PyObject *value)
39673967
return -1;
39683968
}
39693969
Py_BEGIN_CRITICAL_SECTION(obj);
3970-
// To prevent use-after-free from other threads that reference the __dict__
3970+
// gh-133931: To prevent use-after-free from other threads that reference
3971+
// the __dict__
39713972
_PyObject_XSetRefDelayed(dictptr, Py_NewRef(value));
39723973
Py_END_CRITICAL_SECTION();
39733974
return 0;

0 commit comments

Comments
 (0)