11// !!! DO NOT EDIT - THIS IS AN AUTO-GENERATED FILE !!!
2- // Created by amalgamation.sh on 2024-09-30T21:45:33Z
2+ // Created by amalgamation.sh on 2025-02-26T22:28:04Z
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.0 "
62+ #define ROARING_VERSION " 4.2.3 "
6363enum {
6464 ROARING_VERSION_MAJOR = 4 ,
6565 ROARING_VERSION_MINOR = 2 ,
66- ROARING_VERSION_REVISION = 0
66+ ROARING_VERSION_REVISION = 3
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
@@ -125,12 +126,11 @@ enum {
125126#ifndef _POSIX_C_SOURCE
126127#define _POSIX_C_SOURCE 200809L
127128#endif // !(defined(_POSIX_C_SOURCE)) || (_POSIX_C_SOURCE < 200809L)
128- #if !(defined(_XOPEN_SOURCE)) || (_XOPEN_SOURCE < 700)
129- #define _XOPEN_SOURCE 700
130- #endif // !(defined(_XOPEN_SOURCE)) || (_XOPEN_SOURCE < 700)
131129
132130#ifdef __illumos__
131+ #ifndef __EXTENSIONS__
133132#define __EXTENSIONS__
133+ #endif // __EXTENSIONS__
134134#endif
135135
136136#include < stdbool.h>
@@ -1072,7 +1072,8 @@ inline size_t bitset_next_set_bits(const bitset_t *bitset, size_t *buffer,
10721072 return 0 ; // nothing more to iterate over
10731073 }
10741074 uint64_t w = bitset->array [x];
1075- w >>= (*startfrom & 63 );
1075+ // unset low bits inside the word less than *startfrom
1076+ w &= ~((UINT64_C (1 ) << (*startfrom & 63 )) - 1 );
10761077 size_t howmany = 0 ;
10771078 size_t base = x << 6 ;
10781079 while (howmany < capacity) {
@@ -1779,11 +1780,14 @@ roaring_bitmap_t *roaring_bitmap_portable_deserialize(const char *buf);
17791780 * order. This is is guaranteed to happen when serializing an existing bitmap,
17801781 * but not for random inputs.
17811782 *
1782- * You may use roaring_bitmap_internal_validate to check the validity of the
1783- * bitmap prior to using it.
1783+ * If the source is untrusted, you should call
1784+ * roaring_bitmap_internal_validate to check the validity of the
1785+ * bitmap prior to using it. Only after calling roaring_bitmap_internal_validate
1786+ * is the bitmap considered safe for use.
17841787 *
1785- * We recommend that you use checksums to check that serialized data corresponds
1786- * to a serialized bitmap.
1788+ * We also recommend that you use checksums to check that serialized data
1789+ * corresponds to the serialized bitmap. The CRoaring library does not provide
1790+ * checksumming.
17871791 *
17881792 * This function is endian-sensitive. If you have a big-endian system (e.g., a
17891793 * mainframe IBM s390x), the data format is going to be big-endian and not
@@ -2313,6 +2317,10 @@ CROARING_DEPRECATED static inline uint32_t roaring_read_uint32_iterator(
23132317using namespace ::roaring::api;
23142318#endif
23152319#endif
2320+
2321+ // roaring64 will include roaring.h, but we would
2322+ // prefer to avoid having our users include roaring64.h
2323+ // in addition to roaring.h.
23162324/* end file include/roaring/roaring.h */
23172325/* begin file include/roaring/memory.h */
23182326#ifndef INCLUDE_ROARING_MEMORY_H_
@@ -2902,11 +2910,14 @@ size_t roaring64_bitmap_portable_deserialize_size(const char *buf,
29022910 * order. This is is guaranteed to happen when serializing an existing bitmap,
29032911 * but not for random inputs.
29042912 *
2905- * You may use roaring64_bitmap_internal_validate to check the validity of the
2906- * bitmap prior to using it.
2913+ * If the source is untrusted, you should call
2914+ * roaring64_bitmap_internal_validate to check the validity of the
2915+ * bitmap prior to using it. Only after calling
2916+ * roaring64_bitmap_internal_validate is the bitmap considered safe for use.
29072917 *
2908- * We recommend that you use checksums to check that serialized data corresponds
2909- * to a serialized bitmap.
2918+ * We also recommend that you use checksums to check that serialized data
2919+ * corresponds to the serialized bitmap. The CRoaring library does not provide
2920+ * checksumming.
29102921 *
29112922 * This function is endian-sensitive. If you have a big-endian system (e.g., a
29122923 * mainframe IBM s390x), the data format is going to be big-endian and not
0 commit comments