11// !!! DO NOT EDIT - THIS IS AN AUTO-GENERATED FILE !!!
2- // Created by amalgamation.sh on 2024-10-04T22:14:33Z
2+ // Created by amalgamation.sh on 2025-02-24T20:10:07Z
33
44/*
55 * The CRoaring project is under a dual license (Apache/MIT).
5959// /include/roaring/roaring_version.h automatically generated by release.py, do not change by hand
6060#ifndef ROARING_INCLUDE_ROARING_VERSION
6161#define ROARING_INCLUDE_ROARING_VERSION
62- #define ROARING_VERSION " 4.2.1 "
62+ #define ROARING_VERSION " 4.2.2 "
6363enum {
6464 ROARING_VERSION_MAJOR = 4 ,
6565 ROARING_VERSION_MINOR = 2 ,
66- ROARING_VERSION_REVISION = 1
66+ ROARING_VERSION_REVISION = 2
6767};
6868#endif // ROARING_INCLUDE_ROARING_VERSION
6969// clang-format on/* end file include/roaring/roaring_version.h */
@@ -86,9 +86,10 @@ enum {
8686#ifndef CROARING_INCLUDE_PORTABILITY_H_
8787#define CROARING_INCLUDE_PORTABILITY_H_
8888
89- // #ifndef _GNU_SOURCE
90- // #define _GNU_SOURCE 1
91- // #endif // _GNU_SOURCE
89+ // Users who need _GNU_SOURCE should define it?
90+ // #ifndef _GNU_SOURCE
91+ // #define _GNU_SOURCE 1
92+ // #endif // _GNU_SOURCE
9293#ifndef __STDC_FORMAT_MACROS
9394#define __STDC_FORMAT_MACROS 1
9495#endif // __STDC_FORMAT_MACROS
@@ -1072,7 +1073,8 @@ inline size_t bitset_next_set_bits(const bitset_t *bitset, size_t *buffer,
10721073 return 0 ; // nothing more to iterate over
10731074 }
10741075 uint64_t w = bitset->array [x];
1075- w >>= (*startfrom & 63 );
1076+ // unset low bits inside the word less than *startfrom
1077+ w &= ~((UINT64_C (1 ) << (*startfrom & 63 )) - 1 );
10761078 size_t howmany = 0 ;
10771079 size_t base = x << 6 ;
10781080 while (howmany < capacity) {
@@ -1779,11 +1781,14 @@ roaring_bitmap_t *roaring_bitmap_portable_deserialize(const char *buf);
17791781 * order. This is is guaranteed to happen when serializing an existing bitmap,
17801782 * but not for random inputs.
17811783 *
1782- * You may use roaring_bitmap_internal_validate to check the validity of the
1783- * bitmap prior to using it.
1784+ * If the source is untrusted, you should call
1785+ * roaring_bitmap_internal_validate to check the validity of the
1786+ * bitmap prior to using it. Only after calling roaring_bitmap_internal_validate
1787+ * is the bitmap considered safe for use.
17841788 *
1785- * We recommend that you use checksums to check that serialized data corresponds
1786- * to a serialized bitmap.
1789+ * We also recommend that you use checksums to check that serialized data
1790+ * corresponds to the serialized bitmap. The CRoaring library does not provide
1791+ * checksumming.
17871792 *
17881793 * This function is endian-sensitive. If you have a big-endian system (e.g., a
17891794 * mainframe IBM s390x), the data format is going to be big-endian and not
@@ -2313,6 +2318,10 @@ CROARING_DEPRECATED static inline uint32_t roaring_read_uint32_iterator(
23132318using namespace ::roaring::api;
23142319#endif
23152320#endif
2321+
2322+ // roaring64 will include roaring.h, but we would
2323+ // prefer to avoid having our users include roaring64.h
2324+ // in addition to roaring.h.
23162325/* end file include/roaring/roaring.h */
23172326/* begin file include/roaring/memory.h */
23182327#ifndef INCLUDE_ROARING_MEMORY_H_
@@ -2902,11 +2911,14 @@ size_t roaring64_bitmap_portable_deserialize_size(const char *buf,
29022911 * order. This is is guaranteed to happen when serializing an existing bitmap,
29032912 * but not for random inputs.
29042913 *
2905- * You may use roaring64_bitmap_internal_validate to check the validity of the
2906- * bitmap prior to using it.
2914+ * If the source is untrusted, you should call
2915+ * roaring64_bitmap_internal_validate to check the validity of the
2916+ * bitmap prior to using it. Only after calling
2917+ * roaring64_bitmap_internal_validate is the bitmap considered safe for use.
29072918 *
2908- * We recommend that you use checksums to check that serialized data corresponds
2909- * to a serialized bitmap.
2919+ * We also recommend that you use checksums to check that serialized data
2920+ * corresponds to the serialized bitmap. The CRoaring library does not provide
2921+ * checksumming.
29102922 *
29112923 * This function is endian-sensitive. If you have a big-endian system (e.g., a
29122924 * mainframe IBM s390x), the data format is going to be big-endian and not
0 commit comments