GeezerVison is showing github.com — [3.13] gh-152216: Update bundled expat to 2.8.2 (GH-152234) (#154747) · python/cpython@31b4886
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: Makefile.pre.in +3Lines changed: 3 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -626,13 +626,16 @@ LIBEXPAT_HEADERS= \ | 626 | 626 | Modules/expat/expat.h \ | 627 | 627 | Modules/expat/expat_config.h \ | 628 | 628 | Modules/expat/expat_external.h \ | | 629 | + Modules/expat/fallthrough.h \ | 629 | 630 | Modules/expat/iasciitab.h \ | 630 | 631 | Modules/expat/internal.h \ | 631 | 632 | Modules/expat/latin1tab.h \ | | 633 | + Modules/expat/memory_sanitizer.h \ | 632 | 634 | Modules/expat/nametab.h \ | 633 | 635 | Modules/expat/pyexpatns.h \ | 634 | 636 | Modules/expat/siphash.h \ | 635 | 637 | Modules/expat/utf8tab.h \ | | 638 | + Modules/expat/xcsinc.c \ | 636 | 639 | Modules/expat/xmlrole.h \ | 637 | 640 | Modules/expat/xmltok.h \ | 638 | 641 | Modules/expat/xmltok_impl.h \ | |
Collapse file Copy file name to clipboard +1Lines changed: 1 addition & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +Update bundled `libexpat <https://libexpat.github.io/>`_ to version 2.8.2. |
Collapse file Copy file name to clipboardExpand all lines: Misc/sbom.spdx.json +71-14Lines changed: 71 additions & 14 deletions Collapse file Copy file name to clipboardExpand all lines: Modules/expat/expat.h +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -1094,7 +1094,7 @@ XML_SetReparseDeferralEnabled(XML_Parser parser, XML_Bool enabled); | 1094 | 1094 | */ | 1095 | 1095 | # define XML_MAJOR_VERSION 2 | 1096 | 1096 | # define XML_MINOR_VERSION 8 | 1097 | | -# define XML_MICRO_VERSION 1 | | 1097 | +# define XML_MICRO_VERSION 2 | 1098 | 1098 |
| 1099 | 1099 | # ifdef __cplusplus | 1100 | 1100 | } | |
Collapse file Copy file name to clipboard +49Lines changed: 49 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +/* | | 2 | + __ __ _ | | 3 | + ___\ \/ /_ __ __ _| |_ | | 4 | + / _ \\ /| '_ \ / _` | __| | | 5 | + | __// \| |_) | (_| | |_ | | 6 | + \___/_/\_\ .__/ \__,_|\__| | | 7 | + |_| XML parser | | 8 | +
| | 9 | + | | 10 | + Licensed under the MIT license: | | 11 | +
| | 12 | + Permission is hereby granted, free of charge, to any person obtaining | | 13 | + a copy of this software and associated documentation files (the | | 14 | + "Software"), to deal in the Software without restriction, including | | 15 | + without limitation the rights to use, copy, modify, merge, publish, | | 16 | + distribute, sublicense, and/or sell copies of the Software, and to permit | | 17 | + persons to whom the Software is furnished to do so, subject to the | | 18 | + following conditions: | | 19 | +
| | 20 | + The above copyright notice and this permission notice shall be included | | 21 | + in all copies or substantial portions of the Software. | | 22 | +
| | 23 | + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | | 24 | + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | | 25 | + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN | | 26 | + NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, | | 27 | + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR | | 28 | + OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE | | 29 | + USE OR OTHER DEALINGS IN THE SOFTWARE. | | 30 | +*/ | | 31 | + | | 32 | +#ifndef FALLTHROUGH_H | | 33 | +# define FALLTHROUGH_H 1 | | 34 | + | | 35 | +// Explicit fallthrough in switch case to avoid warnings | | 36 | +// with compiler flag -Wimplicit-fallthrough. | | 37 | + | | 38 | +# define EXPAT_FALLTHROUGH \ | | 39 | + do { \ | | 40 | + } while (0) | | 41 | + | | 42 | +# if defined(__has_attribute) | | 43 | +# if __has_attribute(fallthrough) | | 44 | +# undef EXPAT_FALLTHROUGH | | 45 | +# define EXPAT_FALLTHROUGH __attribute__((fallthrough)) | | 46 | +# endif | | 47 | +# endif | | 48 | + | | 49 | +#endif // FALLTHROUGH_H |
Collapse file Copy file name to clipboard +51Lines changed: 51 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +/* | | 2 | + __ __ _ | | 3 | + ___\ \/ /_ __ __ _| |_ | | 4 | + / _ \\ /| '_ \ / _` | __| | | 5 | + | __// \| |_) | (_| | |_ | | 6 | + \___/_/\_\ .__/ \__,_|\__| | | 7 | + |_| XML parser | | 8 | +
| | 9 | + | | 10 | + Licensed under the MIT license: | | 11 | +
| | 12 | + Permission is hereby granted, free of charge, to any person obtaining | | 13 | + a copy of this software and associated documentation files (the | | 14 | + "Software"), to deal in the Software without restriction, including | | 15 | + without limitation the rights to use, copy, modify, merge, publish, | | 16 | + distribute, sublicense, and/or sell copies of the Software, and to permit | | 17 | + persons to whom the Software is furnished to do so, subject to the | | 18 | + following conditions: | | 19 | +
| | 20 | + The above copyright notice and this permission notice shall be included | | 21 | + in all copies or substantial portions of the Software. | | 22 | +
| | 23 | + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | | 24 | + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | | 25 | + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN | | 26 | + NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, | | 27 | + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR | | 28 | + OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE | | 29 | + USE OR OTHER DEALINGS IN THE SOFTWARE. | | 30 | +*/ | | 31 | + | | 32 | +#if ! defined(MEMORY_SANITIZER_H) | | 33 | +# define MEMORY_SANITIZER_H 1 | | 34 | + | | 35 | +# if defined(__has_feature) | | 36 | +# if __has_feature(memory_sanitizer) | | 37 | +# include <sanitizer/msan_interface.h> | | 38 | + | | 39 | +// inform Memory Sanitizer that [base, base + extent) is now initialized | | 40 | +# define MSAN_UNPOISON(base, extent) __msan_unpoison((base), (extent)) | | 41 | + | | 42 | +# endif | | 43 | +# endif | | 44 | + | | 45 | +# if ! defined(MSAN_UNPOISON) | | 46 | +# define MSAN_UNPOISON(base, extent) \ | | 47 | + do { \ | | 48 | + } while (0) | | 49 | +# endif | | 50 | + | | 51 | +#endif // ! defined(MEMORY_SANITIZER_H) |
Collapse file Copy file name to clipboardExpand all lines: Modules/expat/refresh.sh +6-3Lines changed: 6 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 12 | 12 |
| 13 | 13 | # Update this when updating to a new version after verifying that the changes | 14 | 14 | # the update brings in are good. These values are used for verifying the SBOM, too. | 15 | | -expected_libexpat_tag="R_2_8_1" | 16 | | -expected_libexpat_version="2.8.1" | 17 | | -expected_libexpat_sha256="a52eb72108be160e190b5cafa5bba8663f1313f2013e26060d1c18e26e31067b" | | 15 | +expected_libexpat_tag="R_2_8_2" | | 16 | +expected_libexpat_version="2.8.2" | | 17 | +expected_libexpat_sha256="ef7d1994f533c9e7343d6c19f31064fc8ebbcbcaa144be3812b4f43052a05f4c" | 18 | 18 |
| 19 | 19 | expat_dir="$(realpath "$(dirname -- "${BASH_SOURCE[0]}")")" | 20 | 20 | cd ${expat_dir} | @@ -33,13 +33,16 @@ lib_files=( | 33 | 33 | asciitab.h | 34 | 34 | expat.h | 35 | 35 | expat_external.h | | 36 | + fallthrough.h | 36 | 37 | iasciitab.h | 37 | 38 | internal.h | 38 | 39 | latin1tab.h | | 40 | + memory_sanitizer.h | 39 | 41 | nametab.h | 40 | 42 | siphash.h | 41 | 43 | utf8tab.h | 42 | 44 | winconfig.h | | 45 | + xcsinc.c | 43 | 46 | xmlparse.c | 44 | 47 | xmlrole.c | 45 | 48 | xmlrole.h | |
Collapse file Copy file name to clipboardExpand all lines: Modules/expat/siphash.h +8-7Lines changed: 8 additions & 7 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 100 | 100 |
| 101 | 101 | #include <stddef.h> /* size_t */ | 102 | 102 | #include <stdint.h> /* uint64_t uint32_t uint8_t */ | | 103 | +#include "fallthrough.h" | 103 | 104 |
| 104 | 105 | /* | 105 | 106 | * Workaround to not require a C++11 compiler for using ULL suffix | @@ -234,25 +235,25 @@ sip24_final(struct siphash *H) { | 234 | 235 | switch (left) { | 235 | 236 | case 7: | 236 | 237 | b |= (uint64_t)H->buf[6] << 48; | 237 | | - /* fall through */ | | 238 | + EXPAT_FALLTHROUGH; | 238 | 239 | case 6: | 239 | 240 | b |= (uint64_t)H->buf[5] << 40; | 240 | | - /* fall through */ | | 241 | + EXPAT_FALLTHROUGH; | 241 | 242 | case 5: | 242 | 243 | b |= (uint64_t)H->buf[4] << 32; | 243 | | - /* fall through */ | | 244 | + EXPAT_FALLTHROUGH; | 244 | 245 | case 4: | 245 | 246 | b |= (uint64_t)H->buf[3] << 24; | 246 | | - /* fall through */ | | 247 | + EXPAT_FALLTHROUGH; | 247 | 248 | case 3: | 248 | 249 | b |= (uint64_t)H->buf[2] << 16; | 249 | | - /* fall through */ | | 250 | + EXPAT_FALLTHROUGH; | 250 | 251 | case 2: | 251 | 252 | b |= (uint64_t)H->buf[1] << 8; | 252 | | - /* fall through */ | | 253 | + EXPAT_FALLTHROUGH; | 253 | 254 | case 1: | 254 | 255 | b |= (uint64_t)H->buf[0] << 0; | 255 | | - /* fall through */ | | 256 | + EXPAT_FALLTHROUGH; | 256 | 257 | case 0: | 257 | 258 | break; | 258 | 259 | } | |
|