If Python is built with UBSan, test_ctypes now skips test_shorts().
This change allows to run test_ctypes to check for new UBSan regression,
but the known test_shorts() undefined behavior must be fixed.
from ctypes import *
from ctypes.test import need_symbol
+from test import support
import unittest
import os
setattr(b, name, i)
self.assertEqual(getattr(b, name), func(byref(b), name.encode('ascii')))
+ # bpo-46913: _ctypes/cfield.c h_get() has an undefined behavior
+ @support.skip_if_sanitizer(ub=True)
def test_shorts(self):
b = BITS()
name = "M"