397f1b28c4
Fix clang ubsan (undefined behavior sanitizer) warnings in dictobject.c by adjusting how the internal struct _dictkeysobject shared keys structure is declared. This remains ABI compatible. We get rid of the union at the end of the struct being used for conveinence to avoid typecasting in favor of char[] variable length array at the end of a struct. This is known to clang to be used for variable sized objects and will not cause an undefined behavior problem. Similarly, char arrays do not have strict aliasing undefined behavior when cast. PEP-007 does not currently list variable length arrays (VLAs) as allowed in our subset of C99. If this turns out to be a problem, the fix to this is to change the char `dk_indices[]` into `dk_indices[1]` and restore the three size computation subtractions this change removes: `- Py_MEMBER_SIZE(PyDictKeysObject, dk_indices)` If this works as is I'll make a separate PR to update PEP-007. |
||
---|---|---|
.. | ||
2017-11-26-00-59-22.bpo-10544.fHOM3V.rst | ||
2017-12-24-19-48-59.bpo-17611.P85kWL.rst | ||
2018-01-03-23-12-43.bpo-32489.SDEPHB.rst | ||
2018-01-26-21-20-21.bpo-32583.Fh3fau.rst | ||
2018-01-29-14-36-37.bpo-32711.8hQFJP.rst | ||
2018-02-01-10-16-28.bpo-32303.VsvhSl.rst | ||
2018-02-01-10-56-41.bpo-32305.dkU9Qa.rst | ||
2018-02-02-08-50-46.bpo-31356.MNwUOQ.rst | ||
2018-02-14-12-35-47.bpo-32836.bThJnx.rst | ||
2018-02-20-21-53-48.bpo-32889.J6eWy5.rst | ||
2018-02-24-00-07-05.bpo-32925.e-7Ufh.rst | ||
2018-02-24-21-51-42.bpo-32932.2cz31L.rst | ||
2018-02-25-10-52-40.bpo-32946.Lo09rG.rst | ||
2018-02-27-13-36-21.bpo-17288.Gdj24S.rst | ||
2018-03-06-12-19-19.bpo-33005.LP-V2U.rst | ||
2018-03-08-09-48-38.bpo-33026.QZA3Ba.rst | ||
2018-03-10-15-16-40.bpo-33041.-ak5Fk.rst | ||
2018-03-18-13-56-14.bpo-33041.XwPhI2.rst | ||
2018-03-22-23-09-06.bpo-33018.0ncEJV.rst | ||
2018-03-25-19-49-06.bpo-33053.V3xlsH.rst | ||
2018-04-02-09-32-40.bpo-33199.TPnxQu.rst | ||
2018-04-03-00-30-25.bpo-29922.CdLuMl.rst | ||
2018-04-03-00-58-41.bpo-33205.lk2F3r.rst | ||
2018-04-05-22-20-44.bpo-33231.3Jmo0q.rst | ||
2018-04-13-22-31-09.bpo-33176.PB9com.rst | ||
2018-04-14-13-12-50.bpo-33270.UmVV6i.rst | ||
2018-04-19-08-30-07.bpo-33312.mDe2iL.rst | ||
README.rst |
README.rst
Put news entry `blurb`_ files for the *Core and Builtins* section in this directory. .. _blurb: https://pypi.org/project/blurb/