bpo-30694: Upgrade Modules/expat/ to libexpat 2.2.1 by vstinner · Pull Request #2300 · python/cpython (original) (raw)
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation14 Commits1 Checks0 Files changed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
New file: Modules/expat/siphash.h.
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. |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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, |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing whitespace after period?
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 :-)
vstinner added a commit that referenced this pull request
New file: Modules/expat/siphash.h. (cherry picked from commit 5ff7132)
vstinner added a commit that referenced this pull request
New file: Modules/expat/siphash.h. (cherry picked from commit 5ff7132)
vstinner added a commit that referenced this pull request
New file: Modules/expat/siphash.h. (cherry picked from commit 5ff7132)
- siphash.h: Address lack of stdint.h for Visual Studio 2003-2008
(cherry picked from libexpat commit c74d380b8f0b5215153d840d2af9455d9c53b960)
ned-deily pushed a commit to ned-deily/cpython that referenced this pull request
larryhastings pushed a commit that referenced this pull request
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)
New file: Modules/expat/siphash.h. (cherry picked from commit 5ff7132)
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)
ned-deily pushed a commit that referenced this pull request
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)
New file: Modules/expat/siphash.h. (cherry picked from commit 5ff7132)
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)