[MacPorts] #72028: spirv-tools @1.3.296.0: checksum mismatch (was: Checksum mismatch for abseil-cpp-lts)
MacPorts
noreply at macports.org
Sun Feb 9 00:55:00 UTC 2025
#72028: spirv-tools @1.3.296.0: checksum mismatch
--------------------------+--------------------
Reporter: amadeus24 | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords:
Port: spirv-tools |
--------------------------+--------------------
Changes (by ryandesign):
* keywords: Checksum mismatch for abseil-cpp-lts =>
Comment:
Looks like a [PortfileRecipes#stealth-updates stealth update] has
occurred. Here is the difference between the old abseil file we mirrored
and the one currently available upstream:
{{{#!diff
diff -ru old/spirv-tools/abseil-cpp-lts_2024_07_22/MODULE.bazel new/spirv-
tools/abseil-cpp-lts_2024_07_22/MODULE.bazel
--- old/spirv-tools/abseil-cpp-lts_2024_07_22/MODULE.bazel 2024-08-01
13:05:11.000000000 -0500
+++ new/spirv-tools/abseil-cpp-lts_2024_07_22/MODULE.bazel 2025-01-23
08:51:12.000000000 -0600
@@ -16,7 +16,7 @@
module(
name = "abseil-cpp",
- version = "20240722.0",
+ version = "20240722.1",
compatibility_level = 1,
)
diff -ru old/spirv-tools/abseil-cpp-lts_2024_07_22/absl/base/config.h new
/spirv-tools/abseil-cpp-lts_2024_07_22/absl/base/config.h
--- old/spirv-tools/abseil-cpp-lts_2024_07_22/absl/base/config.h
2024-08-01 13:05:11.000000000 -0500
+++ new/spirv-tools/abseil-cpp-lts_2024_07_22/absl/base/config.h
2025-01-23 08:51:12.000000000 -0600
@@ -118,7 +118,7 @@
// LTS releases can be obtained from
// https://github.com/abseil/abseil-cpp/releases.
#define ABSL_LTS_RELEASE_VERSION 20240722
-#define ABSL_LTS_RELEASE_PATCH_LEVEL 0
+#define ABSL_LTS_RELEASE_PATCH_LEVEL 1
// Helper macro to convert a CPP variable to a string literal.
#define ABSL_INTERNAL_DO_TOKEN_STR(x) #x
diff -ru old/spirv-tools/abseil-cpp-
lts_2024_07_22/absl/container/internal/raw_hash_set.h new/spirv-tools
/abseil-cpp-lts_2024_07_22/absl/container/internal/raw_hash_set.h
--- old/spirv-tools/abseil-cpp-
lts_2024_07_22/absl/container/internal/raw_hash_set.h 2024-08-01
13:05:11.000000000 -0500
+++ new/spirv-tools/abseil-cpp-
lts_2024_07_22/absl/container/internal/raw_hash_set.h 2025-01-23
08:51:12.000000000 -0600
@@ -1208,6 +1208,9 @@
// Given the capacity of a table, computes the total size of the
backing
// array.
size_t alloc_size(size_t slot_size) const {
+ ABSL_HARDENING_ASSERT(
+ slot_size <=
+ ((std::numeric_limits<size_t>::max)() - slot_offset_) /
capacity_);
return slot_offset_ + capacity_ * slot_size;
}
@@ -1500,6 +1503,12 @@
return n ? ~size_t{} >> countl_zero(n) : 1;
}
+template <size_t kSlotSize>
+size_t MaxValidCapacity() {
+ return NormalizeCapacity((std::numeric_limits<size_t>::max)() / 4 /
+ kSlotSize);
+}
+
// General notes on capacity/growth methods below:
// - We use 7/8th as maximum load factor. For 16-wide groups, that gives
an
// average of two empty slots per group.
@@ -2614,6 +2623,8 @@
: settings_(CommonFields::CreateDefault<SooEnabled()>(), hash, eq,
alloc) {
if (bucket_count > (SooEnabled() ? SooCapacity() : 0)) {
+ ABSL_RAW_CHECK(bucket_count <=
MaxValidCapacity<sizeof(slot_type)>(),
+ "Hash table size overflow");
resize(NormalizeCapacity(bucket_count));
}
}
@@ -2871,7 +2882,9 @@
ABSL_ASSUME(!kEnabled || cap >= kCapacity);
return cap;
}
- size_t max_size() const { return (std::numeric_limits<size_t>::max)();
}
+ size_t max_size() const {
+ return CapacityToGrowth(MaxValidCapacity<sizeof(slot_type)>());
+ }
ABSL_ATTRIBUTE_REINITIALIZES void clear() {
// Iterating over this container is O(bucket_count()). When
bucket_count()
@@ -3260,6 +3273,8 @@
auto m = NormalizeCapacity(n | GrowthToLowerboundCapacity(size()));
// n == 0 unconditionally rehashes as per the standard.
if (n == 0 || m > cap) {
+ ABSL_RAW_CHECK(m <= MaxValidCapacity<sizeof(slot_type)>(),
+ "Hash table size overflow");
resize(m);
// This is after resize, to ensure that we have completed the
allocation
@@ -3272,6 +3287,7 @@
const size_t max_size_before_growth =
is_soo() ? SooCapacity() : size() + growth_left();
if (n > max_size_before_growth) {
+ ABSL_RAW_CHECK(n <= max_size(), "Hash table size overflow");
size_t m = GrowthToLowerboundCapacity(n);
resize(NormalizeCapacity(m));
diff -ru old/spirv-tools/abseil-cpp-
lts_2024_07_22/absl/container/internal/raw_hash_set_test.cc new/spirv-
tools/abseil-cpp-
lts_2024_07_22/absl/container/internal/raw_hash_set_test.cc
--- old/spirv-tools/abseil-cpp-
lts_2024_07_22/absl/container/internal/raw_hash_set_test.cc
2024-08-01 13:05:11.000000000 -0500
+++ new/spirv-tools/abseil-cpp-
lts_2024_07_22/absl/container/internal/raw_hash_set_test.cc
2025-01-23 08:51:12.000000000 -0600
@@ -3594,6 +3594,14 @@
"hash/eq functors are inconsistent.");
}
+TEST(Table, MaxSizeOverflow) {
+ size_t overflow = (std::numeric_limits<size_t>::max)();
+ EXPECT_DEATH_IF_SUPPORTED(IntTable t(overflow), "Hash table size
overflow");
+ IntTable t;
+ EXPECT_DEATH_IF_SUPPORTED(t.reserve(overflow), "Hash table size
overflow");
+ EXPECT_DEATH_IF_SUPPORTED(t.rehash(overflow), "Hash table size
overflow");
+}
+
} // namespace
} // namespace container_internal
ABSL_NAMESPACE_END
}}}
Instead of following the stealth update recipe verbatim in this case,
which would remirror all distfiles even those that have not changed,
hopefully the portfile can be adjusted so that just the filename and
checksums of this one file gets changed, e.g. to include the new `.1`
patchlevel.
--
Ticket URL: <https://trac.macports.org/ticket/72028#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list