(pedronis, arigo)
segfault when a class contain a non-list value in the (undocumented)
special attribute __slotnames__.
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 41488a4..88c4a15 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -2522,7 +2522,7 @@
 
 	clsdict = ((PyTypeObject *)cls)->tp_dict;
 	slotnames = PyDict_GetItemString(clsdict, "__slotnames__");
-	if (slotnames != NULL) {
+	if (slotnames != NULL && PyList_Check(slotnames)) {
 		Py_INCREF(slotnames);
 		return slotnames;
 	}