gh-111178: fix UBSan failures in Modules/_pickle.c
#129787
+62
−39
Merged