fuzzing

Version, currently master branch1 version
  • master branchlatestNov 12, 2021

github.com/oprypin/crystal-fuzzing

Fuzzing for Crystal programming language

8 stars
0 dependents
License: MIT

Installation

# Add this to your shard.yml
dependencies:
  fuzzing:
    github: oprypin/crystal-fuzzing
    branch: master

master is a branch, not a release, so this tracks it rather than pinning a version.

Then run:

shards install

shard.yml

Crystal
no constraint declared
License
MIT
Author
Oleh Prypin <oleh@pryp.in>

Dependencies

Runtime Dependencies

  • sqlite3~> 0.12.0github: crystal-lang/crystal-sqlite3

README

# [Fuzzing] for [Crystal] programming language


## `crystal fuzz_parser/main.cr`

* Fuzzes Crystal's parser and code stringifier.

* Uses existing parser specs as samples.

* Writes errors into a local SQLite database.
    * Possible sets of fields (others `NULL`):

      | `original_src` | `parsed_src` | `reparsed_src` | `exception` | outcome of Crystal compiler's actions |
      | :-: | :-: | :-: | :-: | -- |
      | ✔ |  |  |  | crashed during initial parsing |
      | ✔ |  |  | ✔ | threw an exception during initial parsing |
      | ✔ | ✔ |  | ✔ | parsed a sample and stringified it but raised when parsing that again |
      | ✔ | ✔ | ✔ | | parsed and stringified a sample, but parsing and stringifying that again produced a different result |
 
    * `sqlitebrowser` recommended for viewing.

* Requires: `crystal`, `radamsa`, `libsqlite3`.


[fuzzing]: https://www.google.com/search?q=fuzzing
[crystal]: https://crystal-lang.org/