gh-111178: fix UBSan failures in Modules/selectmodule.c
#129792
+65
−44
Merged