1
1
// !!! 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
3
3
4
4
/*
5
5
* The CRoaring project is under a dual license (Apache/MIT).
59
59
// /include/roaring/roaring_version.h automatically generated by release.py, do not change by hand
60
60
#ifndef ROARING_INCLUDE_ROARING_VERSION
61
61
#define ROARING_INCLUDE_ROARING_VERSION
62
- #define ROARING_VERSION " 4.2.0 "
62
+ #define ROARING_VERSION " 4.2.3 "
63
63
enum {
64
64
ROARING_VERSION_MAJOR = 4 ,
65
65
ROARING_VERSION_MINOR = 2 ,
66
- ROARING_VERSION_REVISION = 0
66
+ ROARING_VERSION_REVISION = 3
67
67
};
68
68
#endif // ROARING_INCLUDE_ROARING_VERSION
69
69
// clang-format on/* end file include/roaring/roaring_version.h */
@@ -86,9 +86,10 @@ enum {
86
86
#ifndef CROARING_INCLUDE_PORTABILITY_H_
87
87
#define CROARING_INCLUDE_PORTABILITY_H_
88
88
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
92
93
#ifndef __STDC_FORMAT_MACROS
93
94
#define __STDC_FORMAT_MACROS 1
94
95
#endif // __STDC_FORMAT_MACROS
@@ -125,12 +126,11 @@ enum {
125
126
#ifndef _POSIX_C_SOURCE
126
127
#define _POSIX_C_SOURCE 200809L
127
128
#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)
131
129
132
130
#ifdef __illumos__
131
+ #ifndef __EXTENSIONS__
133
132
#define __EXTENSIONS__
133
+ #endif // __EXTENSIONS__
134
134
#endif
135
135
136
136
#include < stdbool.h>
@@ -1072,7 +1072,8 @@ inline size_t bitset_next_set_bits(const bitset_t *bitset, size_t *buffer,
1072
1072
return 0 ; // nothing more to iterate over
1073
1073
}
1074
1074
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 );
1076
1077
size_t howmany = 0 ;
1077
1078
size_t base = x << 6 ;
1078
1079
while (howmany < capacity) {
@@ -1779,11 +1780,14 @@ roaring_bitmap_t *roaring_bitmap_portable_deserialize(const char *buf);
1779
1780
* order. This is is guaranteed to happen when serializing an existing bitmap,
1780
1781
* but not for random inputs.
1781
1782
*
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.
1784
1787
*
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.
1787
1791
*
1788
1792
* This function is endian-sensitive. If you have a big-endian system (e.g., a
1789
1793
* 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(
2313
2317
using namespace ::roaring::api;
2314
2318
#endif
2315
2319
#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.
2316
2324
/* end file include/roaring/roaring.h */
2317
2325
/* begin file include/roaring/memory.h */
2318
2326
#ifndef INCLUDE_ROARING_MEMORY_H_
@@ -2902,11 +2910,14 @@ size_t roaring64_bitmap_portable_deserialize_size(const char *buf,
2902
2910
* order. This is is guaranteed to happen when serializing an existing bitmap,
2903
2911
* but not for random inputs.
2904
2912
*
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.
2907
2917
*
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.
2910
2921
*
2911
2922
* This function is endian-sensitive. If you have a big-endian system (e.g., a
2912
2923
* mainframe IBM s390x), the data format is going to be big-endian and not
0 commit comments