Commit Graph

47 Commits

Author SHA1 Message Date
Daniel Lemire f195f849d0
Helping contributors. (#1289) 2020-11-05 10:27:35 -05:00
friendlyanon 669e5b91b4
Improve CI workflows (#1291)
* Fix Cirrus CI

CMake is not installed at this point yet.

* Add caching in Circle CI

* Add caching to the MinGW Github workflows

* Fix Circle CI config

Co-authored-by: friendlyanon <friendlyanon@users.noreply.github.com>
2020-11-05 08:42:00 -05:00
friendlyanon a56149e79a
Cache CMake dependencies in CI (#1282)
Co-authored-by: friendlyanon <friendlyanon@users.noreply.github.com>
2020-11-04 13:35:33 -05:00
Paul Dreik af4db55e66
remove trailing whitespace (#1284) 2020-11-03 21:48:09 +01:00
Paul Dreik 9f78559cc8
detect trailing whitespace in a CI job (#1268) 2020-11-03 20:41:19 +01:00
Paul Dreik 500e4c3572
fuzz with the intended clang version (#1267)
This builds the CI fuzzers with the intended clang version. It also allows users to set the clang version locally,
in case they need to.

It also switches the CI fuzzers to use an optimized sanitizer build, to do something oss-fuzz doesn't and get more done in the short time the CI fuzzer runs.
2020-10-31 08:22:49 +01:00
Paul Dreik ac87437588
fuzz the on demand api (#1220) 2020-10-29 19:14:44 +01:00
friendlyanon ed21875083
Remove old CMake version (#1259)
The images used by github already come with a sufficiently recent CMake
version instead of a very outdated one. See:
https://github.com/actions/virtual-environments

Co-authored-by: friendlyanon <friendlyanon@users.noreply.github.com>
2020-10-28 09:44:13 -04:00
Daniel Lemire 0a907ec694
Tweaking further the documentation. (#1237)
* Tweaking further the documentation.

* More details.

* Another sentence.

* Saving.

* Tweaking more
2020-10-19 16:51:04 -04:00
Paul Dreik f1b4a54991
add fuzz element (#1204)
* add definitions for is_number and tie (by lemire)
* add fuzzer for element
* update fuzz documentation
* fix UB in creating an empty padded string
* don't bother null terminating padded_string, it is done by the std::memset already
*  refactor fuzz data splitting into a separate class
2020-10-17 05:48:50 +02:00
Paul Dreik 58a3098cd8
fix broken fuzzing github action job (#1221) 2020-10-09 12:44:17 +02:00
Paul Dreik 8a68163905
simplify fuzzing only dynamically supported implementations (#1201)
This refactors the dynamic check of which implementations are supported at runtime.

It also reduces duplicated effort in the CI fuzzing job, the differential fuzzers don't need to run with different values of SIMDJSON_FORCE_IMPLEMENTATION.

There is also a convenience script to run the fuzzers locally, to quickly check that the fuzzers still build, run and no easy to find bugs are there. It should be handy not only when developing the fuzzers, but also when modifying simdjson.
2020-10-09 05:29:54 +02:00
John Keiser 0bb83e06bc Fix root number parsing 2020-10-06 11:29:45 -07:00
Daniel Lemire a540e6afc5
Testing on minimalist alpine (linux) images (#1200)
* Tweaking header includes to make it safer.

* Adding the actual tests.

* Fixing my syntax.
2020-10-02 13:32:09 -04:00
Paul Dreik f1b0778f79
add utf8 fuzzer
This enables the utf8 fuzzer, now when #1187 is fixed
2020-09-27 21:11:13 +02:00
Paul Dreik f44386008c
add minifier fuzzers (#1172)
This adds a minifier fuzzer. There is also an utf-8 fuzzer, but it is disabled until  #1187 is fixed.

Run all fuzzers bug the utf-8 one in the github CI fuzz.
2020-09-26 14:25:00 +02:00
Paul Dreik 30b912fc81
fuzz at_pointer
This adds a fuzzer for at_pointer() which recently had a bug.

The #1142 bug had been found with this fuzzer

Also, it polishes the github action job:

    cross pollinate the fuzzer corpora (lets fuzzers reuse results from other fuzzers)
    use github action syntax instead of bash checks
    only run on push if on master
2020-09-16 21:17:43 +02:00
Paul Dreik 6ecbcc7c19
add multi implementation fuzzer (#1162)
This adds a fuzzer which parses the same input using all the available implementations (haswell, westmere, fallback on x64).

This should get the otherwise uncovered sourcefiles (mostly fallback) to show up in the fuzz coverage.
For instance, the fallback directory has only one line covered.
As of the 20200909 report, 1866 lines are covered out of 4478.

Also, it will detect if the implementations behave differently:

    by making sure they all succeed, or all error
    turning the parsed data into text again, should produce equal results

While at it, I corrected some minor things:

    clean up building too many variants, run with forced implementation (closes #815 )
    always store crashes as artefacts, good in case the fuzzer finds something
    return value of the fuzzer function should always be 0
    reduce log spam
    introduce max size for the seed corpus and the CI fuzzer
2020-09-11 23:46:22 +02:00
Daniel Lemire 2ffbaa9578
This will isolate the perf checks in CI (#1164)
* This will isolate the perf checks.

* Fixed typo
2020-09-10 18:15:45 -04:00
Daniel Lemire 6beb5f5587
This adds debug tests in CI. (#1123)
* This adds debug tests in CI.

* Removing silly labels.

* Typo
2020-08-17 13:36:30 -04:00
Daniel Lemire b1bd8e9ee2 Update issue templates 2020-08-17 08:16:39 -04:00
Daniel Lemire 9e93509a56
Fix number parsing (too lenient). (#1107)
* Fix number parsing (too lenient).

* Minor tweak.

* These are Booleans.

* Tweaking test config
2020-08-10 18:10:11 -04:00
Daniel Lemire 77c8581bc0 Flipping the flags 2020-08-04 12:59:23 -04:00
Christoph Reiter 522cb66582
Make MSYS2 CI jobs actually use MSYS2 (#1081)
The jobs were executed in powershell using the globally installed cmake.
This makes things actually run in a MSYS2 shell.

This also removes the msys/cygwin job because it doesn't build
(it complains about undeclared posix_memalign)
2020-07-29 19:34:14 -04:00
Daniel Lemire dcb5d47ee6 Being clearer. 2020-07-26 15:58:35 -04:00
PavelP e95c22eb21
Add MSYS target for msys2 github workflow (#1075)
* Add MSYS target for msys2 github workflow

* Minimized differences in mingw/mingw64 CI workflows
2020-07-26 15:33:57 -04:00
Daniel Lemire 9fb83e61ea We want the tests to run on PR. 2020-07-26 14:39:47 -04:00
Daniel Lemire 857d77a10a Adding msys2 tests. 2020-07-25 14:32:30 -04:00
Daniel Lemire 29767b2886
Moving gcc 7 out of circle ci (#1052) 2020-07-20 17:49:55 -04:00
Daniel Lemire 039d82ff1b
Returning basictests to its original function: basic tests (only) (#1010)
* The initial motivation behind basictests was for a quick set of sanity tests to check whether your code made sense. It
was not meant for thorough testing to find corner cases. However, over time, it grew to include such expensive tests.
This PR takes them out. It also allows us to bring back basictests to MinGW tests, since it is now cheap.

This is not an exercise in software engineering and making things prettier. This is a pragmatic change to improve our
test coverage and quality of life.

* Adds many more cheap tests.

Co-authored-by: Daniel Lemire <lemire@gmai.com>
2020-07-13 09:39:35 -04:00
Daniel Lemire d0ce2f0b5a
Fixing clang under visual studio (#1028)
* Lots of fixes

* Removing some lambdas

* Removing some functional programming.

Co-authored-by: Daniel Lemire <lemire@gmai.com>
2020-07-06 18:58:19 -04:00
Daniel Lemire 676ed59342
Adding more github actions (#1027)
* Adding more github actions


Co-authored-by: Daniel Lemire <lemire@gmai.com>
2020-07-06 18:20:06 -04:00
Daniel Lemire 1a1e7edb02
Tweaking the recently introduced mingw tests. (#1011)
Co-authored-by: Daniel Lemire <lemire@gmai.com>
2020-06-30 12:47:44 -04:00
Daniel Lemire ccc94c9b05
Mingw tests (32-bit and 64-bit) (#1004) 2020-06-29 21:10:54 -04:00
Daniel Lemire e0180b4849 Update issue templates 2020-04-24 09:57:10 -04:00
Daniel Lemire 76bebfd798 Update issue templates 2020-04-24 09:32:26 -04:00
Daniel Lemire 3013166d8d Update issue templates 2020-04-24 09:26:01 -04:00
Daniel Lemire 8596e702ac
Delete custom.md 2020-04-24 09:20:31 -04:00
Daniel Lemire 414bf4a296 Update issue templates 2020-04-24 09:19:37 -04:00
Daniel Lemire 0daa01edef Update issue templates 2020-04-24 09:18:22 -04:00
Paul Dreik 5710ec13d4
switch to clang 9 in the github action (#695)
The upstream convenience script from llvm does not support installing clang 8 anymore.
2020-04-12 20:02:45 +02:00
John Keiser 165e23773f Refactor stage 2 into structural_parser class 2020-01-02 13:12:22 -07:00
Paul Dreik 4da06830f1 add new fuzzers for print_json and dump_raw_tape (#416)
after looking at the coverage report available at
https://storage.googleapis.com/oss-fuzz-coverage/simdjson/reports/20191222/linux/src/simdjson/report.html
2019-12-27 13:42:44 -05:00
Paul Dreik 29e78413fe
output failed fuzz cases (#409)
this is to get more debug output from cases like this:
c9cd8e6211/checks?check_suite_id=351526761
https://pipelines.actions.githubusercontent.com/gFSIASDqcDhMdHkcuMJEdsUcdOsOrVBr8d56BjAkszcoMkibGp/_apis/pipelines/1/runs/274/signedlogcontent/3?urlExpires=2019-12-21T18%3A50%3A08.3387613Z&urlSigningMethod=HMACV1&urlSignature=DVF3u4jEs81xJP6Hmi8LLQlLOztJke8MsP62J0MXruQ%3D

which ends with:
2019-12-20T23:08:42.6830393Z ../src/generic/numberparsing.h:243:31: runtime error: 1e+311 is outside the range of representable values of type 'double'
2019-12-20T23:08:42.6836790Z SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../src/generic/numberparsing.h:243:31 in
2019-12-20T23:08:42.6837715Z MS: 2 InsertRepeatedBytes-CrossOver-; base unit: 47cf79b80bc84f2ec8b39c1c73daa6c1222ef624
2019-12-20T23:08:42.6866416Z artifact_prefix='./'; Test unit written to ./crash-3fa2f47d980d4bf5812af18fb0d0a0ce9b5cc65a
2019-12-20T23:08:42.6999448Z ##[error]Process completed with exit code 1.
2019-12-20T23:08:42.7030863Z Cleaning up orphan processes


The problem is that github actions does not store artifacts on failure.
2019-12-21 20:32:32 +01:00
Paul Dreik 8192e63a4b
update apt repos before installing (#408)
This should hopefully resolve the recent errors in the github action
for running the fuzzers.
2019-12-21 19:23:51 +01:00
Paul Dreik c5504ef50b
run the oss fuzz initial seed corpus in CI (#378)
This makes sure the seed corpus keeps being healthy.
2019-11-23 22:49:41 +01:00
Paul Dreik 3fd1c3b64a run short fuzzing and valgrind in github action 2019-11-11 22:17:32 +01:00