do safety checks on __qualname__ assignment
diff --git a/Misc/NEWS b/Misc/NEWS
index 726d1f7..347885f 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -12,6 +12,9 @@
 Core and Builtins
 -----------------
 
+- Fix segfaults on setting __qualname__ on builtin types and attempting to
+  delete it on any type.
+
 - Issue #16271: Fix strange bugs that resulted from __qualname__ appearing in a
   class's __dict__ and on type.