Skip to content

Commit 6c7e226

Browse files
deps: update simdjson to 4.6.9
PR-URL: #65655 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 3475dac commit 6c7e226

2 files changed

Lines changed: 40 additions & 67 deletions

File tree

deps/simdjson/simdjson.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* auto-generated on 2026-08-14 12:14:27 -0400. version 4.6.7 Do not edit! */
1+
/* auto-generated on 2026-08-24 17:10:01 -0400. version 4.6.9 Do not edit! */
22
/* including simdjson.cpp: */
33
/* begin file simdjson.cpp */
44
#define SIMDJSON_SRC_SIMDJSON_CPP

deps/simdjson/simdjson.h

Lines changed: 39 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* auto-generated on 2026-08-14 12:14:27 -0400. version 4.6.7 Do not edit! */
1+
/* auto-generated on 2026-08-24 17:10:01 -0400. version 4.6.9 Do not edit! */
22
/* including simdjson.h: */
33
/* begin file simdjson.h */
44
#ifndef SIMDJSON_H
@@ -2538,7 +2538,7 @@ namespace std {
25382538
#define SIMDJSON_SIMDJSON_VERSION_H
25392539

25402540
/** The version of simdjson being used (major.minor.revision) */
2541-
#define SIMDJSON_VERSION "4.6.7"
2541+
#define SIMDJSON_VERSION "4.6.9"
25422542

25432543
namespace simdjson {
25442544
enum {
@@ -2553,7 +2553,7 @@ enum {
25532553
/**
25542554
* The revision (major.minor.REVISION) of simdjson being used.
25552555
*/
2556-
SIMDJSON_VERSION_REVISION = 7
2556+
SIMDJSON_VERSION_REVISION = 9
25572557
};
25582558
} // namespace simdjson
25592559

@@ -69201,6 +69201,7 @@ template <typename Func>
6920169201
template <typename Func>
6920269202
#endif
6920369203
inline error_code value::for_each_at_path_with_wildcard(std::string_view json_path, Func&& callback) noexcept {
69204+
if (size_t(iter.depth()) >= iter.json_iter().parser->max_depth()) { return DEPTH_ERROR; }
6920469205
json_type t;
6920569206
SIMDJSON_TRY(type().get(t));
6920669207
switch (t) {
@@ -72864,13 +72865,9 @@ simdjson_inline bool raw_json_string::unsafe_is_equal(std::string_view target) c
7286472865
if(target.size() <= SIMDJSON_PADDING) {
7286572866
return (raw()[target.size()] == '"') && !memcmp(raw(), target.data(), target.size());
7286672867
}
72867-
const char * r{raw()};
72868-
size_t pos{0};
72869-
for(;pos < target.size();pos++) {
72870-
if(r[pos] != target[pos]) { return false; }
72871-
}
72872-
if(r[pos] != '"') { return false; }
72873-
return true;
72868+
// Past SIMDJSON_PADDING we can no longer rely on the padding to keep the
72869+
// comparison in bounds, so we must stop at the quote terminating the key.
72870+
return is_equal(target);
7287472871
}
7287572872

7287672873
simdjson_inline bool raw_json_string::is_equal(std::string_view target) const noexcept {
@@ -82583,6 +82580,7 @@ template <typename Func>
8258382580
template <typename Func>
8258482581
#endif
8258582582
inline error_code value::for_each_at_path_with_wildcard(std::string_view json_path, Func&& callback) noexcept {
82583+
if (size_t(iter.depth()) >= iter.json_iter().parser->max_depth()) { return DEPTH_ERROR; }
8258682584
json_type t;
8258782585
SIMDJSON_TRY(type().get(t));
8258882586
switch (t) {
@@ -86246,13 +86244,9 @@ simdjson_inline bool raw_json_string::unsafe_is_equal(std::string_view target) c
8624686244
if(target.size() <= SIMDJSON_PADDING) {
8624786245
return (raw()[target.size()] == '"') && !memcmp(raw(), target.data(), target.size());
8624886246
}
86249-
const char * r{raw()};
86250-
size_t pos{0};
86251-
for(;pos < target.size();pos++) {
86252-
if(r[pos] != target[pos]) { return false; }
86253-
}
86254-
if(r[pos] != '"') { return false; }
86255-
return true;
86247+
// Past SIMDJSON_PADDING we can no longer rely on the padding to keep the
86248+
// comparison in bounds, so we must stop at the quote terminating the key.
86249+
return is_equal(target);
8625686250
}
8625786251

8625886252
simdjson_inline bool raw_json_string::is_equal(std::string_view target) const noexcept {
@@ -96452,6 +96446,7 @@ template <typename Func>
9645296446
template <typename Func>
9645396447
#endif
9645496448
inline error_code value::for_each_at_path_with_wildcard(std::string_view json_path, Func&& callback) noexcept {
96449+
if (size_t(iter.depth()) >= iter.json_iter().parser->max_depth()) { return DEPTH_ERROR; }
9645596450
json_type t;
9645696451
SIMDJSON_TRY(type().get(t));
9645796452
switch (t) {
@@ -100115,13 +100110,9 @@ simdjson_inline bool raw_json_string::unsafe_is_equal(std::string_view target) c
100115100110
if(target.size() <= SIMDJSON_PADDING) {
100116100111
return (raw()[target.size()] == '"') && !memcmp(raw(), target.data(), target.size());
100117100112
}
100118-
const char * r{raw()};
100119-
size_t pos{0};
100120-
for(;pos < target.size();pos++) {
100121-
if(r[pos] != target[pos]) { return false; }
100122-
}
100123-
if(r[pos] != '"') { return false; }
100124-
return true;
100113+
// Past SIMDJSON_PADDING we can no longer rely on the padding to keep the
100114+
// comparison in bounds, so we must stop at the quote terminating the key.
100115+
return is_equal(target);
100125100116
}
100126100117

100127100118
simdjson_inline bool raw_json_string::is_equal(std::string_view target) const noexcept {
@@ -110321,6 +110312,7 @@ template <typename Func>
110321110312
template <typename Func>
110322110313
#endif
110323110314
inline error_code value::for_each_at_path_with_wildcard(std::string_view json_path, Func&& callback) noexcept {
110315+
if (size_t(iter.depth()) >= iter.json_iter().parser->max_depth()) { return DEPTH_ERROR; }
110324110316
json_type t;
110325110317
SIMDJSON_TRY(type().get(t));
110326110318
switch (t) {
@@ -113984,13 +113976,9 @@ simdjson_inline bool raw_json_string::unsafe_is_equal(std::string_view target) c
113984113976
if(target.size() <= SIMDJSON_PADDING) {
113985113977
return (raw()[target.size()] == '"') && !memcmp(raw(), target.data(), target.size());
113986113978
}
113987-
const char * r{raw()};
113988-
size_t pos{0};
113989-
for(;pos < target.size();pos++) {
113990-
if(r[pos] != target[pos]) { return false; }
113991-
}
113992-
if(r[pos] != '"') { return false; }
113993-
return true;
113979+
// Past SIMDJSON_PADDING we can no longer rely on the padding to keep the
113980+
// comparison in bounds, so we must stop at the quote terminating the key.
113981+
return is_equal(target);
113994113982
}
113995113983

113996113984
simdjson_inline bool raw_json_string::is_equal(std::string_view target) const noexcept {
@@ -124305,6 +124293,7 @@ template <typename Func>
124305124293
template <typename Func>
124306124294
#endif
124307124295
inline error_code value::for_each_at_path_with_wildcard(std::string_view json_path, Func&& callback) noexcept {
124296+
if (size_t(iter.depth()) >= iter.json_iter().parser->max_depth()) { return DEPTH_ERROR; }
124308124297
json_type t;
124309124298
SIMDJSON_TRY(type().get(t));
124310124299
switch (t) {
@@ -127968,13 +127957,9 @@ simdjson_inline bool raw_json_string::unsafe_is_equal(std::string_view target) c
127968127957
if(target.size() <= SIMDJSON_PADDING) {
127969127958
return (raw()[target.size()] == '"') && !memcmp(raw(), target.data(), target.size());
127970127959
}
127971-
const char * r{raw()};
127972-
size_t pos{0};
127973-
for(;pos < target.size();pos++) {
127974-
if(r[pos] != target[pos]) { return false; }
127975-
}
127976-
if(r[pos] != '"') { return false; }
127977-
return true;
127960+
// Past SIMDJSON_PADDING we can no longer rely on the padding to keep the
127961+
// comparison in bounds, so we must stop at the quote terminating the key.
127962+
return is_equal(target);
127978127963
}
127979127964

127980127965
simdjson_inline bool raw_json_string::is_equal(std::string_view target) const noexcept {
@@ -138606,6 +138591,7 @@ template <typename Func>
138606138591
template <typename Func>
138607138592
#endif
138608138593
inline error_code value::for_each_at_path_with_wildcard(std::string_view json_path, Func&& callback) noexcept {
138594+
if (size_t(iter.depth()) >= iter.json_iter().parser->max_depth()) { return DEPTH_ERROR; }
138609138595
json_type t;
138610138596
SIMDJSON_TRY(type().get(t));
138611138597
switch (t) {
@@ -142269,13 +142255,9 @@ simdjson_inline bool raw_json_string::unsafe_is_equal(std::string_view target) c
142269142255
if(target.size() <= SIMDJSON_PADDING) {
142270142256
return (raw()[target.size()] == '"') && !memcmp(raw(), target.data(), target.size());
142271142257
}
142272-
const char * r{raw()};
142273-
size_t pos{0};
142274-
for(;pos < target.size();pos++) {
142275-
if(r[pos] != target[pos]) { return false; }
142276-
}
142277-
if(r[pos] != '"') { return false; }
142278-
return true;
142258+
// Past SIMDJSON_PADDING we can no longer rely on the padding to keep the
142259+
// comparison in bounds, so we must stop at the quote terminating the key.
142260+
return is_equal(target);
142279142261
}
142280142262

142281142263
simdjson_inline bool raw_json_string::is_equal(std::string_view target) const noexcept {
@@ -152381,6 +152363,7 @@ template <typename Func>
152381152363
template <typename Func>
152382152364
#endif
152383152365
inline error_code value::for_each_at_path_with_wildcard(std::string_view json_path, Func&& callback) noexcept {
152366+
if (size_t(iter.depth()) >= iter.json_iter().parser->max_depth()) { return DEPTH_ERROR; }
152384152367
json_type t;
152385152368
SIMDJSON_TRY(type().get(t));
152386152369
switch (t) {
@@ -156044,13 +156027,9 @@ simdjson_inline bool raw_json_string::unsafe_is_equal(std::string_view target) c
156044156027
if(target.size() <= SIMDJSON_PADDING) {
156045156028
return (raw()[target.size()] == '"') && !memcmp(raw(), target.data(), target.size());
156046156029
}
156047-
const char * r{raw()};
156048-
size_t pos{0};
156049-
for(;pos < target.size();pos++) {
156050-
if(r[pos] != target[pos]) { return false; }
156051-
}
156052-
if(r[pos] != '"') { return false; }
156053-
return true;
156030+
// Past SIMDJSON_PADDING we can no longer rely on the padding to keep the
156031+
// comparison in bounds, so we must stop at the quote terminating the key.
156032+
return is_equal(target);
156054156033
}
156055156034

156056156035
simdjson_inline bool raw_json_string::is_equal(std::string_view target) const noexcept {
@@ -166179,6 +166158,7 @@ template <typename Func>
166179166158
template <typename Func>
166180166159
#endif
166181166160
inline error_code value::for_each_at_path_with_wildcard(std::string_view json_path, Func&& callback) noexcept {
166161+
if (size_t(iter.depth()) >= iter.json_iter().parser->max_depth()) { return DEPTH_ERROR; }
166182166162
json_type t;
166183166163
SIMDJSON_TRY(type().get(t));
166184166164
switch (t) {
@@ -169842,13 +169822,9 @@ simdjson_inline bool raw_json_string::unsafe_is_equal(std::string_view target) c
169842169822
if(target.size() <= SIMDJSON_PADDING) {
169843169823
return (raw()[target.size()] == '"') && !memcmp(raw(), target.data(), target.size());
169844169824
}
169845-
const char * r{raw()};
169846-
size_t pos{0};
169847-
for(;pos < target.size();pos++) {
169848-
if(r[pos] != target[pos]) { return false; }
169849-
}
169850-
if(r[pos] != '"') { return false; }
169851-
return true;
169825+
// Past SIMDJSON_PADDING we can no longer rely on the padding to keep the
169826+
// comparison in bounds, so we must stop at the quote terminating the key.
169827+
return is_equal(target);
169852169828
}
169853169829

169854169830
simdjson_inline bool raw_json_string::is_equal(std::string_view target) const noexcept {
@@ -179981,6 +179957,7 @@ template <typename Func>
179981179957
template <typename Func>
179982179958
#endif
179983179959
inline error_code value::for_each_at_path_with_wildcard(std::string_view json_path, Func&& callback) noexcept {
179960+
if (size_t(iter.depth()) >= iter.json_iter().parser->max_depth()) { return DEPTH_ERROR; }
179984179961
json_type t;
179985179962
SIMDJSON_TRY(type().get(t));
179986179963
switch (t) {
@@ -183644,13 +183621,9 @@ simdjson_inline bool raw_json_string::unsafe_is_equal(std::string_view target) c
183644183621
if(target.size() <= SIMDJSON_PADDING) {
183645183622
return (raw()[target.size()] == '"') && !memcmp(raw(), target.data(), target.size());
183646183623
}
183647-
const char * r{raw()};
183648-
size_t pos{0};
183649-
for(;pos < target.size();pos++) {
183650-
if(r[pos] != target[pos]) { return false; }
183651-
}
183652-
if(r[pos] != '"') { return false; }
183653-
return true;
183624+
// Past SIMDJSON_PADDING we can no longer rely on the padding to keep the
183625+
// comparison in bounds, so we must stop at the quote terminating the key.
183626+
return is_equal(target);
183654183627
}
183655183628

183656183629
simdjson_inline bool raw_json_string::is_equal(std::string_view target) const noexcept {

0 commit comments

Comments
 (0)