Files
scylladb/utils
Piotr Sarna 45d7144529 rjson: add a throwing allocator
The default rapidjson allocator returns nullptr from
a failed allocation or reallocation. It's not a bug by itself,
but rapidjson internals usually don't check for these return values
and happily use nullptr as a valid pointer, which leads to segmentation
faults and memory corruptions.
In order to prevent these bugs, the default allocator is wrapped
with a class which simply throws once it fails to allocate or reallocate
memory, thus preventing the use of nullptr in the code.
One exception is Malloc/Realloc with size 0, which is expected
to return nullptr by rapidjson code.
2021-04-21 14:26:38 +02:00
..
2020-01-30 14:10:18 +02:00
2020-03-23 11:59:30 +02:00
2021-03-08 16:04:20 +01:00
2020-08-03 15:55:16 +03:00
2020-10-13 12:32:14 +03:00
2020-10-13 12:32:14 +03:00
2020-08-04 17:54:45 +03:00
2021-02-14 19:09:29 +02:00
2020-10-18 18:16:30 +03:00
2021-04-21 14:26:38 +02:00
2021-04-21 14:26:38 +02:00
2020-03-23 11:59:30 +02:00
2021-03-08 16:04:20 +01:00