summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrobot-contrib <[email protected]>2026-07-15 11:40:26 +0300
committerrobot-contrib <[email protected]>2026-07-15 12:57:57 +0300
commitc75eff331c1832df0eec461b1f1a95ede9803d54 (patch)
tree7afbeb02503b799450e7c990a0fc8494469ed6a2
parentbb19c518cd9454fa29f43862c2ba9723019c866b (diff)
Update contrib/libs/croaring to 4.7.2
commit_hash:d9ab185d548129c44c573e8dde316daf90085dd4
-rw-r--r--contrib/libs/croaring/.yandex_meta/override.nix4
-rw-r--r--contrib/libs/croaring/AGENTS.md8
-rw-r--r--contrib/libs/croaring/cpp/roaring/roaring.hh8
-rw-r--r--contrib/libs/croaring/include/roaring/roaring_version.h4
-rw-r--r--contrib/libs/croaring/src/bitset_util.c4
-rw-r--r--contrib/libs/croaring/ya.make4
6 files changed, 18 insertions, 14 deletions
diff --git a/contrib/libs/croaring/.yandex_meta/override.nix b/contrib/libs/croaring/.yandex_meta/override.nix
index 0bc39a1316f..534abb9060a 100644
--- a/contrib/libs/croaring/.yandex_meta/override.nix
+++ b/contrib/libs/croaring/.yandex_meta/override.nix
@@ -1,12 +1,12 @@
pkgs: attrs: with pkgs; with attrs; rec {
pname = "croaring";
- version = "4.7.1";
+ version = "4.7.2";
src = fetchFromGitHub {
owner = "RoaringBitmap";
repo = "CRoaring";
rev = "v${version}";
- hash = "sha256-FZP+RTV4pcj9pzDq3G2+sWeJnkh9WnW3Atd0CC9zDCk=";
+ hash = "sha256-WSEMkXkR6diE5CV3gQ3tUAodLqNsWmBmrGyXOKg4CJA=";
};
patches = [];
diff --git a/contrib/libs/croaring/AGENTS.md b/contrib/libs/croaring/AGENTS.md
index ca439b42222..f85c04cef49 100644
--- a/contrib/libs/croaring/AGENTS.md
+++ b/contrib/libs/croaring/AGENTS.md
@@ -14,10 +14,10 @@ The library's documented contract is explicit and consistent across the public A
Relevant documentation locations:
-- [include/roaring/roaring.h](/Users/dlemire/CVS/github/CRoaring/include/roaring/roaring.h) (around lines 671-678, 726-738, 1067-1082): detailed comments on `roaring_bitmap_*_deserialize*` and `roaring_bitmap_internal_validate`.
-- [include/roaring/roaring64.h](/Users/dlemire/CVS/github/CRoaring/include/roaring/roaring64.h) (around lines 615-631, 365-376): equivalent guidance for 64-bit bitmaps.
-- [README.md](/Users/dlemire/CVS/github/CRoaring/README.md) (lines 357-375, 645-678): API summary and example code showing the required validate-after-deserialize pattern for untrusted input.
+- include/roaring/roaring.h: detailed comments on `roaring_bitmap_*_deserialize*` and `roaring_bitmap_internal_validate`.
+- include/roaring/roaring64.h: equivalent guidance for 64-bit bitmaps.
+- README.md: API summary and example code showing the required validate-after-deserialize pattern for untrusted input.
The robust deserialization tests in `tests/robust_deserialization_unit.c` and fuzzing harnesses exist precisely to ensure the safe deserializers and the validators behave correctly under adversarial input. A report that treats "deserializing attacker-controlled bytes and then using the result without validation" as a bug in the deserializer is a misunderstanding of the stated API contract.
-When triaging such reports, point to the validation requirement in the function documentation and close as "not a bug / user error / documented behavior." \ No newline at end of file
+When triaging such reports, point to the validation requirement in the function documentation and close as "not a bug / user error / documented behavior."
diff --git a/contrib/libs/croaring/cpp/roaring/roaring.hh b/contrib/libs/croaring/cpp/roaring/roaring.hh
index d039a367cf8..f1af9aca589 100644
--- a/contrib/libs/croaring/cpp/roaring/roaring.hh
+++ b/contrib/libs/croaring/cpp/roaring/roaring.hh
@@ -666,8 +666,8 @@ class Roaring {
* many, many bytes could be read. See also readSafe.
*
* The function may throw std::runtime_error if a bitmap could not be read.
- * Note that even if it does not throw, the bitmap could still be unusable if
- * the loaded data does not match the portable Roaring specification: you
+ * Note that even if it does not throw, the bitmap could still be unusable
+ * if the loaded data does not match the portable Roaring specification: you
* should ensure that the data you load come from a serialized bitmap.
*/
static Roaring read(const char *buf, bool portable = true) {
@@ -699,8 +699,8 @@ class Roaring {
* method).
*
* The function may throw std::runtime_error if a bitmap could not be read.
- * Note that even if it does not throw, the bitmap could still be unusable if
- * the loaded data does not match the portable Roaring specification: you
+ * Note that even if it does not throw, the bitmap could still be unusable
+ * if the loaded data does not match the portable Roaring specification: you
* should ensure that the data you load come from a serialized bitmap.
*/
static Roaring readSafe(const char *buf, size_t maxbytes) {
diff --git a/contrib/libs/croaring/include/roaring/roaring_version.h b/contrib/libs/croaring/include/roaring/roaring_version.h
index eb5b1b358cb..cfe16193be5 100644
--- a/contrib/libs/croaring/include/roaring/roaring_version.h
+++ b/contrib/libs/croaring/include/roaring/roaring_version.h
@@ -2,11 +2,11 @@
// /include/roaring/roaring_version.h automatically generated by release.py, do not change by hand
#ifndef ROARING_INCLUDE_ROARING_VERSION
#define ROARING_INCLUDE_ROARING_VERSION
-#define ROARING_VERSION "4.7.1"
+#define ROARING_VERSION "4.7.2"
enum {
ROARING_VERSION_MAJOR = 4,
ROARING_VERSION_MINOR = 7,
- ROARING_VERSION_REVISION = 1
+ ROARING_VERSION_REVISION = 2
};
#endif // ROARING_INCLUDE_ROARING_VERSION
// clang-format on \ No newline at end of file
diff --git a/contrib/libs/croaring/src/bitset_util.c b/contrib/libs/croaring/src/bitset_util.c
index 6bc12b44b49..c75bfdf1520 100644
--- a/contrib/libs/croaring/src/bitset_util.c
+++ b/contrib/libs/croaring/src/bitset_util.c
@@ -576,6 +576,7 @@ const uint8_t vbmi2_table[64] = {
size_t bitset_extract_setbits_avx512(const uint64_t *words, size_t length,
uint32_t *vout, size_t outcapacity,
uint32_t base) {
+ if (outcapacity == 0) return 0;
uint32_t *out = (uint32_t *)vout;
uint32_t *initout = out;
uint32_t *safeout = out + outcapacity;
@@ -632,6 +633,7 @@ size_t bitset_extract_setbits_avx512(const uint64_t *words, size_t length,
size_t bitset_extract_setbits_avx512_uint16(const uint64_t *array,
size_t length, uint16_t *vout,
size_t capacity, uint16_t base) {
+ if (capacity == 0) return 0;
uint16_t *out = (uint16_t *)vout;
uint16_t *initout = out;
uint16_t *safeout = vout + capacity;
@@ -683,6 +685,7 @@ CROARING_TARGET_AVX2
size_t bitset_extract_setbits_avx2(const uint64_t *words, size_t length,
uint32_t *out, size_t outcapacity,
uint32_t base) {
+ if (outcapacity == 0) return 0;
uint32_t *initout = out;
__m256i baseVec = _mm256_set1_epi32(base - 1);
__m256i incVec = _mm256_set1_epi32(64);
@@ -786,6 +789,7 @@ CROARING_TARGET_AVX2
size_t bitset_extract_setbits_sse_uint16(const uint64_t *words, size_t length,
uint16_t *out, size_t outcapacity,
uint16_t base) {
+ if (outcapacity == 0) return 0;
uint16_t *initout = out;
__m128i baseVec = _mm_set1_epi16(base - 1);
__m128i incVec = _mm_set1_epi16(64);
diff --git a/contrib/libs/croaring/ya.make b/contrib/libs/croaring/ya.make
index 0f8b7adfccb..597a865b41c 100644
--- a/contrib/libs/croaring/ya.make
+++ b/contrib/libs/croaring/ya.make
@@ -10,9 +10,9 @@ LICENSE(
LICENSE_TEXTS(.yandex_meta/licenses.list.txt)
-VERSION(4.7.1)
+VERSION(4.7.2)
-ORIGINAL_SOURCE(https://github.com/RoaringBitmap/CRoaring/archive/v4.7.1.tar.gz)
+ORIGINAL_SOURCE(https://github.com/RoaringBitmap/CRoaring/archive/v4.7.2.tar.gz)
ADDINCL(
GLOBAL contrib/libs/croaring/include