From 1bcf71bd85059ab6574ea1159de9298dcc1212c5 Mon Sep 17 00:00:00 2001 From: Daniel Lemire Date: Wed, 6 May 2026 17:29:56 -0400 Subject: [PATCH] release 4.6.4 --- CMakeLists.txt | 2 +- Doxyfile | 2 +- include/simdjson/simdjson_version.h | 4 +- singleheader/simdjson.cpp | 2 +- singleheader/simdjson.h | 105 +++++++++++++++++++++++++++- singleheader/singleheader.zip | Bin 10468381 -> 10471567 bytes 6 files changed, 107 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1ed44e953..b9c4c90f7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,7 +12,7 @@ endif() project( simdjson # The version number is modified by tools/release.py - VERSION 4.6.3 + VERSION 4.6.4 DESCRIPTION "Parsing gigabytes of JSON per second" HOMEPAGE_URL "https://simdjson.org/" LANGUAGES CXX C diff --git a/Doxyfile b/Doxyfile index 9749703df..2361a412c 100644 --- a/Doxyfile +++ b/Doxyfile @@ -38,7 +38,7 @@ PROJECT_NAME = simdjson # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = "4.6.3" +PROJECT_NUMBER = "4.6.4" # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/include/simdjson/simdjson_version.h b/include/simdjson/simdjson_version.h index a8c09f7c9..d0fe2397f 100644 --- a/include/simdjson/simdjson_version.h +++ b/include/simdjson/simdjson_version.h @@ -4,7 +4,7 @@ #define SIMDJSON_SIMDJSON_VERSION_H /** The version of simdjson being used (major.minor.revision) */ -#define SIMDJSON_VERSION "4.6.3" +#define SIMDJSON_VERSION "4.6.4" namespace simdjson { enum { @@ -19,7 +19,7 @@ enum { /** * The revision (major.minor.REVISION) of simdjson being used. */ - SIMDJSON_VERSION_REVISION = 3 + SIMDJSON_VERSION_REVISION = 4 }; } // namespace simdjson diff --git a/singleheader/simdjson.cpp b/singleheader/simdjson.cpp index 9f9078f34..6fa969359 100644 --- a/singleheader/simdjson.cpp +++ b/singleheader/simdjson.cpp @@ -1,4 +1,4 @@ -/* auto-generated on 2026-04-17 17:22:06 -0400. version 4.6.3 Do not edit! */ +/* auto-generated on 2026-05-06 17:28:39 -0400. version 4.6.4 Do not edit! */ /* including simdjson.cpp: */ /* begin file simdjson.cpp */ #define SIMDJSON_SRC_SIMDJSON_CPP diff --git a/singleheader/simdjson.h b/singleheader/simdjson.h index bf90ae260..b9befc5b1 100644 --- a/singleheader/simdjson.h +++ b/singleheader/simdjson.h @@ -1,4 +1,4 @@ -/* auto-generated on 2026-04-17 17:22:06 -0400. version 4.6.3 Do not edit! */ +/* auto-generated on 2026-05-06 17:28:39 -0400. version 4.6.4 Do not edit! */ /* including simdjson.h: */ /* begin file simdjson.h */ #ifndef SIMDJSON_H @@ -2538,7 +2538,7 @@ namespace std { #define SIMDJSON_SIMDJSON_VERSION_H /** The version of simdjson being used (major.minor.revision) */ -#define SIMDJSON_VERSION "4.6.3" +#define SIMDJSON_VERSION "4.6.4" namespace simdjson { enum { @@ -2553,7 +2553,7 @@ enum { /** * The revision (major.minor.REVISION) of simdjson being used. */ - SIMDJSON_VERSION_REVISION = 3 + SIMDJSON_VERSION_REVISION = 4 }; } // namespace simdjson @@ -39794,6 +39794,7 @@ simdjson_warn_unused simdjson_result extract_fractured_json( /* begin file simdjson/generic/builder/json_string_builder-inl.h for arm64 */ #include #include +#include #include #ifndef SIMDJSON_GENERIC_STRING_BUILDER_INL_H @@ -40549,6 +40550,11 @@ simdjson_inline void string_builder::append(number_type v) noexcept { simdjson_inline void string_builder::escape_and_append(std::string_view input) noexcept { // escaping might turn a control character into \x00xx so 6 characters. + // Guard against size_t overflow in the multiplication below. + if (input.size() > (std::numeric_limits::max)() / 6) { + set_valid(false); + return; + } if (capacity_check(6 * input.size())) { position += write_string_escaped(input, buffer.get() + position); } @@ -40557,6 +40563,11 @@ string_builder::escape_and_append(std::string_view input) noexcept { simdjson_inline void string_builder::escape_and_append_with_quotes(std::string_view input) noexcept { // escaping might turn a control character into \x00xx so 6 characters. + // Guard against size_t overflow in the arithmetic below. + if (input.size() > ((std::numeric_limits::max)() - 2) / 6) { + set_valid(false); + return; + } if (capacity_check(2 + 6 * input.size())) { buffer.get()[position++] = '"'; position += write_string_escaped(input, buffer.get() + position); @@ -41878,6 +41889,7 @@ simdjson_warn_unused simdjson_result extract_fractured_json( /* begin file simdjson/generic/builder/json_string_builder-inl.h for fallback */ #include #include +#include #include #ifndef SIMDJSON_GENERIC_STRING_BUILDER_INL_H @@ -42633,6 +42645,11 @@ simdjson_inline void string_builder::append(number_type v) noexcept { simdjson_inline void string_builder::escape_and_append(std::string_view input) noexcept { // escaping might turn a control character into \x00xx so 6 characters. + // Guard against size_t overflow in the multiplication below. + if (input.size() > (std::numeric_limits::max)() / 6) { + set_valid(false); + return; + } if (capacity_check(6 * input.size())) { position += write_string_escaped(input, buffer.get() + position); } @@ -42641,6 +42658,11 @@ string_builder::escape_and_append(std::string_view input) noexcept { simdjson_inline void string_builder::escape_and_append_with_quotes(std::string_view input) noexcept { // escaping might turn a control character into \x00xx so 6 characters. + // Guard against size_t overflow in the arithmetic below. + if (input.size() > ((std::numeric_limits::max)() - 2) / 6) { + set_valid(false); + return; + } if (capacity_check(2 + 6 * input.size())) { buffer.get()[position++] = '"'; position += write_string_escaped(input, buffer.get() + position); @@ -44449,6 +44471,7 @@ simdjson_warn_unused simdjson_result extract_fractured_json( /* begin file simdjson/generic/builder/json_string_builder-inl.h for haswell */ #include #include +#include #include #ifndef SIMDJSON_GENERIC_STRING_BUILDER_INL_H @@ -45204,6 +45227,11 @@ simdjson_inline void string_builder::append(number_type v) noexcept { simdjson_inline void string_builder::escape_and_append(std::string_view input) noexcept { // escaping might turn a control character into \x00xx so 6 characters. + // Guard against size_t overflow in the multiplication below. + if (input.size() > (std::numeric_limits::max)() / 6) { + set_valid(false); + return; + } if (capacity_check(6 * input.size())) { position += write_string_escaped(input, buffer.get() + position); } @@ -45212,6 +45240,11 @@ string_builder::escape_and_append(std::string_view input) noexcept { simdjson_inline void string_builder::escape_and_append_with_quotes(std::string_view input) noexcept { // escaping might turn a control character into \x00xx so 6 characters. + // Guard against size_t overflow in the arithmetic below. + if (input.size() > ((std::numeric_limits::max)() - 2) / 6) { + set_valid(false); + return; + } if (capacity_check(2 + 6 * input.size())) { buffer.get()[position++] = '"'; position += write_string_escaped(input, buffer.get() + position); @@ -47020,6 +47053,7 @@ simdjson_warn_unused simdjson_result extract_fractured_json( /* begin file simdjson/generic/builder/json_string_builder-inl.h for icelake */ #include #include +#include #include #ifndef SIMDJSON_GENERIC_STRING_BUILDER_INL_H @@ -47775,6 +47809,11 @@ simdjson_inline void string_builder::append(number_type v) noexcept { simdjson_inline void string_builder::escape_and_append(std::string_view input) noexcept { // escaping might turn a control character into \x00xx so 6 characters. + // Guard against size_t overflow in the multiplication below. + if (input.size() > (std::numeric_limits::max)() / 6) { + set_valid(false); + return; + } if (capacity_check(6 * input.size())) { position += write_string_escaped(input, buffer.get() + position); } @@ -47783,6 +47822,11 @@ string_builder::escape_and_append(std::string_view input) noexcept { simdjson_inline void string_builder::escape_and_append_with_quotes(std::string_view input) noexcept { // escaping might turn a control character into \x00xx so 6 characters. + // Guard against size_t overflow in the arithmetic below. + if (input.size() > ((std::numeric_limits::max)() - 2) / 6) { + set_valid(false); + return; + } if (capacity_check(2 + 6 * input.size())) { buffer.get()[position++] = '"'; position += write_string_escaped(input, buffer.get() + position); @@ -49706,6 +49750,7 @@ simdjson_warn_unused simdjson_result extract_fractured_json( /* begin file simdjson/generic/builder/json_string_builder-inl.h for ppc64 */ #include #include +#include #include #ifndef SIMDJSON_GENERIC_STRING_BUILDER_INL_H @@ -50461,6 +50506,11 @@ simdjson_inline void string_builder::append(number_type v) noexcept { simdjson_inline void string_builder::escape_and_append(std::string_view input) noexcept { // escaping might turn a control character into \x00xx so 6 characters. + // Guard against size_t overflow in the multiplication below. + if (input.size() > (std::numeric_limits::max)() / 6) { + set_valid(false); + return; + } if (capacity_check(6 * input.size())) { position += write_string_escaped(input, buffer.get() + position); } @@ -50469,6 +50519,11 @@ string_builder::escape_and_append(std::string_view input) noexcept { simdjson_inline void string_builder::escape_and_append_with_quotes(std::string_view input) noexcept { // escaping might turn a control character into \x00xx so 6 characters. + // Guard against size_t overflow in the arithmetic below. + if (input.size() > ((std::numeric_limits::max)() - 2) / 6) { + set_valid(false); + return; + } if (capacity_check(2 + 6 * input.size())) { buffer.get()[position++] = '"'; position += write_string_escaped(input, buffer.get() + position); @@ -52709,6 +52764,7 @@ simdjson_warn_unused simdjson_result extract_fractured_json( /* begin file simdjson/generic/builder/json_string_builder-inl.h for westmere */ #include #include +#include #include #ifndef SIMDJSON_GENERIC_STRING_BUILDER_INL_H @@ -53464,6 +53520,11 @@ simdjson_inline void string_builder::append(number_type v) noexcept { simdjson_inline void string_builder::escape_and_append(std::string_view input) noexcept { // escaping might turn a control character into \x00xx so 6 characters. + // Guard against size_t overflow in the multiplication below. + if (input.size() > (std::numeric_limits::max)() / 6) { + set_valid(false); + return; + } if (capacity_check(6 * input.size())) { position += write_string_escaped(input, buffer.get() + position); } @@ -53472,6 +53533,11 @@ string_builder::escape_and_append(std::string_view input) noexcept { simdjson_inline void string_builder::escape_and_append_with_quotes(std::string_view input) noexcept { // escaping might turn a control character into \x00xx so 6 characters. + // Guard against size_t overflow in the arithmetic below. + if (input.size() > ((std::numeric_limits::max)() - 2) / 6) { + set_valid(false); + return; + } if (capacity_check(2 + 6 * input.size())) { buffer.get()[position++] = '"'; position += write_string_escaped(input, buffer.get() + position); @@ -55186,6 +55252,7 @@ simdjson_warn_unused simdjson_result extract_fractured_json( /* begin file simdjson/generic/builder/json_string_builder-inl.h for lsx */ #include #include +#include #include #ifndef SIMDJSON_GENERIC_STRING_BUILDER_INL_H @@ -55941,6 +56008,11 @@ simdjson_inline void string_builder::append(number_type v) noexcept { simdjson_inline void string_builder::escape_and_append(std::string_view input) noexcept { // escaping might turn a control character into \x00xx so 6 characters. + // Guard against size_t overflow in the multiplication below. + if (input.size() > (std::numeric_limits::max)() / 6) { + set_valid(false); + return; + } if (capacity_check(6 * input.size())) { position += write_string_escaped(input, buffer.get() + position); } @@ -55949,6 +56021,11 @@ string_builder::escape_and_append(std::string_view input) noexcept { simdjson_inline void string_builder::escape_and_append_with_quotes(std::string_view input) noexcept { // escaping might turn a control character into \x00xx so 6 characters. + // Guard against size_t overflow in the arithmetic below. + if (input.size() > ((std::numeric_limits::max)() - 2) / 6) { + set_valid(false); + return; + } if (capacity_check(2 + 6 * input.size())) { buffer.get()[position++] = '"'; position += write_string_escaped(input, buffer.get() + position); @@ -57686,6 +57763,7 @@ simdjson_warn_unused simdjson_result extract_fractured_json( /* begin file simdjson/generic/builder/json_string_builder-inl.h for lasx */ #include #include +#include #include #ifndef SIMDJSON_GENERIC_STRING_BUILDER_INL_H @@ -58441,6 +58519,11 @@ simdjson_inline void string_builder::append(number_type v) noexcept { simdjson_inline void string_builder::escape_and_append(std::string_view input) noexcept { // escaping might turn a control character into \x00xx so 6 characters. + // Guard against size_t overflow in the multiplication below. + if (input.size() > (std::numeric_limits::max)() / 6) { + set_valid(false); + return; + } if (capacity_check(6 * input.size())) { position += write_string_escaped(input, buffer.get() + position); } @@ -58449,6 +58532,11 @@ string_builder::escape_and_append(std::string_view input) noexcept { simdjson_inline void string_builder::escape_and_append_with_quotes(std::string_view input) noexcept { // escaping might turn a control character into \x00xx so 6 characters. + // Guard against size_t overflow in the arithmetic below. + if (input.size() > ((std::numeric_limits::max)() - 2) / 6) { + set_valid(false); + return; + } if (capacity_check(2 + 6 * input.size())) { buffer.get()[position++] = '"'; position += write_string_escaped(input, buffer.get() + position); @@ -60190,6 +60278,7 @@ simdjson_warn_unused simdjson_result extract_fractured_json( /* begin file simdjson/generic/builder/json_string_builder-inl.h for rvv_vls */ #include #include +#include #include #ifndef SIMDJSON_GENERIC_STRING_BUILDER_INL_H @@ -60945,6 +61034,11 @@ simdjson_inline void string_builder::append(number_type v) noexcept { simdjson_inline void string_builder::escape_and_append(std::string_view input) noexcept { // escaping might turn a control character into \x00xx so 6 characters. + // Guard against size_t overflow in the multiplication below. + if (input.size() > (std::numeric_limits::max)() / 6) { + set_valid(false); + return; + } if (capacity_check(6 * input.size())) { position += write_string_escaped(input, buffer.get() + position); } @@ -60953,6 +61047,11 @@ string_builder::escape_and_append(std::string_view input) noexcept { simdjson_inline void string_builder::escape_and_append_with_quotes(std::string_view input) noexcept { // escaping might turn a control character into \x00xx so 6 characters. + // Guard against size_t overflow in the arithmetic below. + if (input.size() > ((std::numeric_limits::max)() - 2) / 6) { + set_valid(false); + return; + } if (capacity_check(2 + 6 * input.size())) { buffer.get()[position++] = '"'; position += write_string_escaped(input, buffer.get() + position); diff --git a/singleheader/singleheader.zip b/singleheader/singleheader.zip index 2ea284b227243de3076094a4a82ff7b3d394bb30..10cebf6af63552ba2feec9aa2a2779121712abae 100644 GIT binary patch delta 3389 zcmd_tdrVtZ90%}~75d;=pu!li3pi+HEv39GFr)*a2Cp0 z7-t&J!a0lJERr)VXAf}}#aT3G+c=BiY&&PMoW*e#&)E*n1kMsTOXMtxvxhm`$yqXI zDV*s(Wcu%Z2w7jP?&=?Fqc=OZjNYV!%lgy@Shef&vR=Bp{76HtUuGg{;{2kdq{P%3 znJkk&&T*TF5>g{vvq`D23k+a{G%!Irm>~l)Aq%o02XY|~Ebu7gLje@RZYYAsq}in6 z>pJ?ZP#rE6EbduVkf$a+oP?G#wNx}wKHju5Elnuvw6`A-?947YI-Ej>*wc8}DYPQ} zrlYOL1koWlX?k835#5NPQ7s5!lb{nFZJkcz`nx(k4S%scI^y1Ug%(STy<4x-3u!_& zX=18((Y0l3gtSsv9VxRt&}7Yxg1udIHn%i7#Rj4Nzh)H*1>Jf3ls5YQi4B5zb9PBy zR6QL-bunfOEq3h*CE=&4a>@N=@!*hGDpFXRb>3I9XzR}?*vx{y*tCfw=R}~|Zp^?%AE4|_?)!N$` z;vN4&ZK;A5l3V4H=T_-~&2mI%Gkp;0d!23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