bpo-30694: Upgrade Modules/expat/ to libexpat 2.2.1#2300
bpo-30694: Upgrade Modules/expat/ to libexpat 2.2.1#2300vstinner merged 1 commit intopython:masterfrom vstinner:expat211
Conversation
New file: Modules/expat/siphash.h.
| * -------------------------------------------------------------------------- | ||
| * Derived by William Ahern from the reference implementation[1] published[2] | ||
| * by Jean-Philippe Aumasson and Daniel J. Berstein. Licensed in kind. | ||
| * by Jean-Philippe Aumasson and Daniel J. Berstein. |
There was a problem hiding this comment.
Is this line a duplicate of the previous one?
| * USAGE: | ||
| * | ||
| * SipHash-2-4 takes as input two 64-bit words as the key, some number of | ||
| * message bytes, and outputs a 64-bit word as the message digest. This |
There was a problem hiding this comment.
Missing whitespace after period?
| * state. | ||
| * | ||
| * For converting a 16-byte unsigned char array to a key, use either the | ||
| * macro sip_keyof or the routine sip_tokey. The former instantiates a |
There was a problem hiding this comment.
Missing whitespace after period?
| * | ||
| * To convert the 64-bit hash value to a canonical 8-byte little-endian | ||
| * binary representation, use either the macro sip_binof or the routine | ||
| * sip_tobin. The former instantiates and returns a compound literal array, |
There was a problem hiding this comment.
Missing whitespace after period?
| * NOTES: | ||
| * | ||
| * o Neither sip_keyof, sip_binof, nor siphash24 will work with compilers | ||
| * lacking compound literal support. Instead, you must use the lower-level |
There was a problem hiding this comment.
Missing whitespace after period?
| * lacking compound literal support. Instead, you must use the lower-level | ||
| * interfaces which take as parameters the temporary state objects. | ||
| * | ||
| * o Uppercase macros may evaluate parameters more than once. Lowercase |
There was a problem hiding this comment.
Missing whitespace after period?
|
@marco-buttu: Modules/expat/ is a copy of the 2.2.1 branch of the http://github.com/libexpat/libexpat project. Please report your issues to the project directly :-) |
|
I generated this PR using the rebuild_expat_dir.sh script attached to http://bugs.python.org/issue30694 I only reverted a single change, to get the #include "pyexpatns.h" line. My main contribution was the Misc/NEWS entry :-) |
|
I would have prefer to wait for a review before merging, but IMHO we have too many open security issues, so I would like to move fast. For this specific PR, I just copied code from libexpat 2.2.1, I only wrote the Misc/NEWS entry. So it's not like I can do a lot of mistakes :-) |
|
GH-2312 is a backport of this pull request to the 2.7 branch. |
|
GH-2313 is a backport of this pull request to the 3.6 branch. |
|
GH-2314 is a backport of this pull request to the 3.5 branch. |
|
looks good to me. |
|
Thanks @Haypo , it has been fixed. |
…thon#2313) New file: Modules/expat/siphash.h. (cherry picked from commit 5ff7132) (cherry picked from commit 4a66524)
…2164) (#2203) * bpo-29591: Upgrade Modules/expat to libexpat 2.2 (#2164) * bpo-29591: Upgrade Modules/expat to libexpat 2.2 * bpo-29591: Restore Python changes on expat * bpo-29591: Remove expat config of unsupported platforms Remove the configuration (Modules/expat/*config.h) of unsupported platforms: * Amiga * MacOS Classic on PPC32 * Open Watcom * bpo-29591: Remove useless XML_HAS_SET_HASH_SALT The XML_HAS_SET_HASH_SALT define of Modules/expat/expat.h became useless since our local expat copy was upgrade to expat 2.1 (it's now expat 2.2.0). (cherry picked from commit 23ec4b5) * bpo-30694: Upgrade Modules/expat/ to libexpat 2.2.1 (#2300) New file: Modules/expat/siphash.h. (cherry picked from commit 5ff7132) * bpo-30726: PCbuild _elementtree: remove duplicate defines (#2348) bpo-30726, bpo-29591: libexpat 2.2.1 of Modules/expat/ now uses a winconfig.h configuration file which already defines: * XML_NS * XML_DTD * BYTEORDER=1234 * XML_CONTEXT_BYTES=1024 * HAVE_MEMMOVE Remove these defines from PCbuild/_elementtree.vcxproj to prevent compiler warnings. Co-Authored-By: Jeremy Kloth <jeremy.kloth@gmail.com> (cherry picked from commit c8fb58b) * bpo-30726: Fix elementtree warnings on Windows due to expat upgrade (#2319) * bpo-30726: Fix elementtree warnings on Windows Caused by usage of `getenv` which should be safe. And a few integer truncations which should also be ok. * bpo-30726: Don't ignore libexpat warnings which haypo intends to fix upstream (cherry picked from commit 87c6555)
…2164) (#2204) * bpo-29591: Upgrade Modules/expat to libexpat 2.2 (#2164) * bpo-29591: Upgrade Modules/expat to libexpat 2.2 * bpo-29591: Restore Python changes on expat * bpo-29591: Remove expat config of unsupported platforms Remove the configuration (Modules/expat/*config.h) of unsupported platforms: * Amiga * MacOS Classic on PPC32 * Open Watcom * bpo-29591: Remove useless XML_HAS_SET_HASH_SALT The XML_HAS_SET_HASH_SALT define of Modules/expat/expat.h became useless since our local expat copy was upgrade to expat 2.1 (it's now expat 2.2.0). (cherry picked from commit 23ec4b5) * bpo-30694: Upgrade Modules/expat/ to libexpat 2.2.1 (#2300) New file: Modules/expat/siphash.h. (cherry picked from commit 5ff7132) * bpo-30726: PCbuild _elementtree: remove duplicate defines (#2348) bpo-30726, bpo-29591: libexpat 2.2.1 of Modules/expat/ now uses a winconfig.h configuration file which already defines: * XML_NS * XML_DTD * BYTEORDER=1234 * XML_CONTEXT_BYTES=1024 * HAVE_MEMMOVE Remove these defines from PCbuild/_elementtree.vcxproj to prevent compiler warnings. Co-Authored-By: Jeremy Kloth <jeremy.kloth@gmail.com> (cherry picked from commit c8fb58b) * bpo-30726: Fix elementtree warnings on Windows due to expat upgrade (#2319) * bpo-30726: Fix elementtree warnings on Windows Caused by usage of `getenv` which should be safe. And a few integer truncations which should also be ok. * bpo-30726: Don't ignore libexpat warnings which haypo intends to fix upstream (cherry picked from commit 87c6555)
New file: Modules/expat/siphash.h.