]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-148200: Update Modules/_hacl/ for Cygwin (#149802)
authorVictor Stinner <vstinner@python.org>
Fri, 15 May 2026 12:42:30 +0000 (14:42 +0200)
committerGitHub <noreply@github.com>
Fri, 15 May 2026 12:42:30 +0000 (14:42 +0200)
This pulls an updated version of HACL* that fixes Lib_Memzero0.c on
Cygwin, via an upstream fix.

Misc/sbom.spdx.json
Modules/_hacl/Lib_Memzero0.c
Modules/_hacl/libintvector.h
Modules/_hacl/refresh.sh

index 28a8b59f17cf63d55bbf46a77cbd2fa4fa12bb6f..5791592dc77a84f9f41c86f82da39866f67401c5 100644 (file)
       "checksums": [
         {
           "algorithm": "SHA1",
-          "checksumValue": "0a0b7f3714167ad45ddf5a6a48d76f525a119c9c"
+          "checksumValue": "67a029736da5efe96f1b2d41b92f00934b955253"
         },
         {
           "algorithm": "SHA256",
-          "checksumValue": "135d4afb4812468885c963c9c87a55ba5fae9181df4431af5fbad08588dda229"
+          "checksumValue": "0d80c2e3f5ff3b31ef0d435fc3196660df89ccf95bdcbb6545dc2f9df07bec9f"
         }
       ],
       "fileName": "Modules/_hacl/Lib_Memzero0.c"
       "checksums": [
         {
           "algorithm": "SHA1",
-          "checksumValue": "63e47cc290c4ec887dca708000876ac37ee75ba0"
+          "checksumValue": "8d6a23f4e932cace0c67896bdda46cb24bf5e0ea"
         },
         {
           "algorithm": "SHA256",
-          "checksumValue": "d09a6196d65c2645974100eb922002bd387d3ae13f2653780f82ed97a79af635"
+          "checksumValue": "25decbcadf1fef51f473daa4975a3754480fc903b03068bf95f149fb5349456e"
         }
       ],
       "fileName": "Modules/_hacl/libintvector.h"
       "checksums": [
         {
           "algorithm": "SHA256",
-          "checksumValue": "61e48893f37cb2280d106cefacf6fb5afe84edf625fec39572d0ee94e1018f26"
+          "checksumValue": "d6db56a5d061dcc0890eabdbb5f58a9fa6c606d9f2fbbe9d626925b870ffadfb"
         }
       ],
-      "downloadLocation": "https://github.com/hacl-star/hacl-star/archive/8ba599b2f6c9701b3dc961db895b0856a2210f76.zip",
+      "downloadLocation": "https://github.com/hacl-star/hacl-star/archive/504c2987452f87fe44bce9b9f12e19d6e051761f.zip",
       "externalRefs": [
         {
           "referenceCategory": "SECURITY",
-          "referenceLocator": "cpe:2.3:a:hacl-star:hacl-star:8ba599b2f6c9701b3dc961db895b0856a2210f76:*:*:*:*:*:*:*",
+          "referenceLocator": "cpe:2.3:a:hacl-star:hacl-star:504c2987452f87fe44bce9b9f12e19d6e051761f:*:*:*:*:*:*:*",
           "referenceType": "cpe23Type"
         }
       ],
       "name": "hacl-star",
       "originator": "Organization: HACL* Developers",
       "primaryPackagePurpose": "SOURCE",
-      "versionInfo": "8ba599b2f6c9701b3dc961db895b0856a2210f76"
+      "versionInfo": "504c2987452f87fe44bce9b9f12e19d6e051761f"
     },
     {
       "SPDXID": "SPDXRef-PACKAGE-macholib",
index f94e0e2254a9128b68fd1c70f6c3620aa4af11af..7ab722e737c2ef750c85c3598b6cc7faef583327 100644 (file)
@@ -31,7 +31,7 @@
 #include <string.h>
 #endif
 
-#if defined(__FreeBSD__) || defined(__NetBSD__)
+#if defined(__CYGWIN__) || defined(__FreeBSD__) || defined(__NetBSD__)
 #include <strings.h>
 #endif
 
@@ -57,7 +57,7 @@ void Lib_Memzero0_memzero0(void *dst, uint64_t len) {
     SecureZeroMemory(dst, len_);
   #elif defined(__APPLE__) && defined(__MACH__) && defined(APPLE_HAS_MEMSET_S)
     memset_s(dst, len_, 0, len_);
-  #elif (defined(__linux__) && !defined(LINUX_NO_EXPLICIT_BZERO)) || defined(__FreeBSD__) || defined(__OpenBSD__)
+  #elif (defined(__linux__) && !defined(LINUX_NO_EXPLICIT_BZERO)) || defined(__CYGWIN__) || defined(__FreeBSD__) || defined(__OpenBSD__)
     explicit_bzero(dst, len_);
   #elif defined(__NetBSD__)
     explicit_memset(dst, 0, len_);
index 6db5253eee4f24c422f463f469c0ec1958238ee9..75ec2e0589830b1310d64c678ccb2b18e47180a6 100644 (file)
@@ -802,6 +802,18 @@ vector128 Lib_IntVector_Intrinsics_vec128_xor(vector128 x0, vector128 x1) {
 #if defined(HACL_CAN_COMPILE_VEC128)
 
 #include <altivec.h>
+
+/* GCC's AltiVec extension hijacks 'bool' as '__vector __bool int'.
+   Restore C99/C11 scalar bool for HACL* code. */
+#if defined(__GNUC__) && !defined(__clang__)
+#undef bool
+#define bool _Bool
+#undef true
+#define true 1
+#undef false
+#define false 0
+#endif
+
 #include <string.h> // for memcpy
 #include <stdint.h>
 
index 72ceb27b7f70e8ecb119e9c1e99a56436ded766a..c73bd4ee90f4c5569930dc6441b4d763bf453c21 100755 (executable)
@@ -22,7 +22,7 @@ fi
 
 # Update this when updating to a new version after verifying that the changes
 # the update brings in are good.
-expected_hacl_star_rev=8ba599b2f6c9701b3dc961db895b0856a2210f76
+expected_hacl_star_rev=504c2987452f87fe44bce9b9f12e19d6e051761f
 
 hacl_dir="$(realpath "$1")"
 cd "$(dirname "$0")"