apllodb / apllodb

A RDBMS with Immutable Schema feature
Apache License 2.0
33 stars 2 forks source link

SQL fuzzer #175

Open laysakura opened 3 years ago

laysakura commented 3 years ago

https://www.cockroachlabs.com/blog/sqlsmith-randomized-sql-testing/

writes good things.

We generated some random bytes and sent them off to our parser. Most of the time they didn’t even make it past the scanner/lexer, because most byte sequences aren’t valid SQL tokens.

Then we had SQL tokens in the correct order which passed the lexer and parser, but not the semantic (type) checker. In order to cross that hurdle, we would need something that was aware of types, tables, columns, and their availability in different scopes.

laysakura commented 3 years ago

Issued an idea to generate SQLs from .pest files: https://github.com/pest-parser/pest/issues/503

laysakura commented 2 years ago

This error reports libFuzzer requires more than 2GB of memory.

Current fuzzing test has limited effect in that input data is just random bytes (not SQLs).

I will stop current fuzzing test in the future PR.