John Keiser
cdb607f202
Add comments on confusing "simdjson_unused"
2021-02-22 09:39:09 -08:00
John Keiser
bcab8d3abf
Check for end object/array at top level
...
This avoids a very unlikely buffer overrun that can occur in a particular kind of invalid JSON:
- the document is invalid with an unclosed top level array or object
- the last thing in the document is a number that ends at EOF
- the padding is filled entirely with numeric digits
2021-02-22 09:35:21 -08:00
John Keiser
9d747642fe
Merge pull request #1452 from simdjson/jkeiser/safe-iter-fix
...
Fix bug reporting out of order iteration
2021-02-22 09:34:49 -08:00
John Keiser
a755203aee
Update value_iterator-inl.h
2021-02-22 09:34:20 -08:00
John Keiser
814726e5d4
Merge pull request #1432 from simdjson/jkeiser/safe-lookup
...
Alert user when they use object indexing incorrectly
2021-02-22 09:31:59 -08:00
John Keiser
c4a312e6c3
Fix strict overflow warning
2021-02-21 14:06:58 -08:00
Daniel Lemire
81609393f1
Fixing issue 1449. ( #1451 )
2021-02-21 16:33:05 -05:00
John Keiser
0634958329
Don't emit out of order iteration error for empty array
2021-02-21 11:43:36 -08:00
John Keiser
b352b903e7
Fix bug where iterators didn't always report errors
2021-02-21 11:43:36 -08:00
John Keiser
74d6658f39
Make out of order iteration tests actually test errors in the loop
2021-02-21 11:43:36 -08:00
John Keiser
3076de0405
Use SIMDJSON_DEVELOPMENT_CHECKS instead of SIMDJSON_PRODUCTION
...
Don't enable in retail
2021-02-20 11:46:01 -08:00
John Keiser
4a0a0ed4c6
Split more tests into separate methods
2021-02-20 11:22:24 -08:00
Vadim Peretokin
c5def8f706
Document SIMDJSON_EXCEPTIONS ( #1443 )
...
* Document SIMDJSON_EXCEPTIONS
* Add an example
* Enchance clarity
2021-02-17 14:30:58 -05:00
Daniel Lemire
610b3ad302
Adds Visual Studio 2017 to CI (for real) and adapt our build/tests ( #1444 )
2021-02-15 19:49:12 -05:00
Daniel Lemire
4c63a929bc
This makes it possible to a have document instance (DOM) that is separate from the parser if you would like. ( #1430 )
...
* This makes it possible to a have document instance that is separate from the parser if you would like.
2021-02-10 14:44:53 -05:00
Daniel Lemire
0f72ff3a57
Adding Visual studio 2017 CI tests to GitHub actions. ( #1438 )
...
* Adding Visual studio 2017 CI tests to GitHub actions.
* Fixing the name.
2021-02-09 10:05:45 -05:00
Daniel Lemire
67afcd4edd
Adding legacy Win32 / Visual Studio 2017 CI tests to GitHub Actions. ( #1439 )
2021-02-09 10:05:33 -05:00
David CARLIER
6e9ada2d6c
unit test macos build fix ( #1434 )
2021-02-08 14:12:39 -05:00
John Keiser
9651efe626
Split up tests for compile times
2021-02-06 11:07:14 -08:00
John Keiser
df7201ba42
Fix Windows assume error
2021-02-06 11:06:53 -08:00
John Keiser
14315ec5cd
Default SIMDJSON_PRODUCTION to OFF for bare header usage
2021-02-06 11:06:37 -08:00
John Keiser
0f10fc9ad9
Fix Windows _assume warning
2021-02-05 18:53:39 -08:00
John Keiser
ce678fd986
Fix GCC 7 strict-overflow warning
2021-02-05 18:53:31 -08:00
John Keiser
9d693da852
Only set container depth when a container iteration starts
2021-02-05 17:20:24 -08:00
John Keiser
22742b6bd6
Make max_depth() a simple check
2021-02-05 17:11:03 -08:00
John Keiser
a33bf40a7d
Add tests for sibling indexing detection
2021-02-05 16:39:52 -08:00
John Keiser
3801ea7777
Disable all OUT_OF_ORDER_ITERATION checks when SIMDJSON_API_USAGE_CHECKS
...
is off
2021-02-05 16:39:44 -08:00
John Keiser
c7935ceed1
Put parser capacity / max_depth back into parser
2021-02-05 16:39:36 -08:00
John Keiser
ea119a5679
Start parsing at depth 1 instead of using descend_to for it
2021-02-05 16:39:34 -08:00
John Keiser
7a324da548
Add -DSIMDJSON_PRODUCTION flag
2021-02-05 16:34:27 -08:00
John Keiser
0d1c99a6ad
Allow object lookup safety to be disabled
...
Use cmake -DSIMDJSON_API_USAGE_CHECKS=OFF ..
2021-02-05 10:18:01 -08:00
John Keiser
e4626d233c
Descend into fields at the value position, not the key
2021-02-05 10:18:01 -08:00
John Keiser
9934f65987
Store start index of each depth for safety
2021-02-05 10:17:28 -08:00
John Keiser
b2de2dfd1b
Merge pull request #1416 from simdjson/jkeiser/safe-iterators-2
...
Add safety checks for out of order array/object iteration+indexing
2021-02-05 09:47:03 -08:00
John Keiser
3f2639a655
Merge pull request #1414 from simdjson/jkeiser/array-assert
...
Fix #1409 (assert when trying to get one value as multiple types)
2021-02-05 09:45:49 -08:00
Daniel Lemire
26b5b19f88
Unneeded.
2021-02-02 17:58:10 -05:00
Daniel Lemire
5449365658
This should make issue 1370 easier to track. ( #1429 )
...
* This should make issue 1370 easier to track.
* Avoiding exceptions.
2021-02-02 16:12:16 -05:00
Daniel Lemire
96536239c2
Deleting the function. ( #1428 )
2021-02-02 09:48:01 -05:00
Daniel Lemire
0e18453e34
Potential optimizations applied to jkeiser/array-assert ( #1421 )
...
* Some tuning.
* Using table lookups...
2021-02-01 12:39:10 -05:00
Daniel Lemire
777202e1f1
Why would you use a reference when looping? ( #1422 )
...
* Why would you use a reference?
* I missed a few cases.
2021-02-01 12:30:36 -05:00
Daniel Lemire
6f61ed1477
It appears that Qt uses macros for common terms like slots, signals and so forth. ( #1425 )
2021-02-01 11:31:29 -05:00
Daniel Lemire
a509e04f9b
Let us actually test the find package functionality. ( #1418 )
...
* Let us actually test the find package functionality.
* Specifying the path.
* Fixing the path.
2021-01-28 13:59:35 -05:00
tobim
152eb983ff
Fix the CMake generated install target ( #1412 )
...
* Re-enable installation of simdjson-config.cmake
* Install a simdjson-config-version.cmake file
2021-01-27 18:39:05 -05:00
Daniel Lemire
d6f33e4830
This adds a little test to see if we can compiler with very strict flags (conventional casts) ( #1417 )
...
* This adds a little test to see if we can compiler with very strict flags.
* Trimming a leftover old-style cast.
* More cleaning.
* A few more pedantic casts.
2021-01-27 18:37:30 -05:00
Tibbel
5613d30e97
partly replacement old-style-cast to c++ *_cast ( #1403 )
...
Co-authored-by: Tibbel <tibbel@ma-gi.de>
2021-01-27 13:33:48 -05:00
John Keiser
1bfbb6448a
Check out-of-order error in object index
2021-01-26 20:49:14 -08:00
John Keiser
c5b44f44f9
Add partial out-of-order check for field lookup
2021-01-26 20:00:39 -08:00
John Keiser
22b3ea93a8
Emit an error if user tries to iterate arrays out of order
2021-01-26 20:00:19 -08:00
John Keiser
fe726b0f80
Split up ondemand_dom_api_tests for sanitize build times
2021-01-26 19:42:37 -08:00
John Keiser
18ecc0032d
Reenable test that is now working
2021-01-26 15:15:09 -08:00