In v4.7.0, we have new instruction to configure sqlcipher. To run SQLCipher specific tests, configure as described in README and run the following to execute the tests
$ ./configure --with-tempstore=yes --enable-fts5 CFLAGS="-DSQLITE_HAS_CODEC -DSQLITE_EXTRA_INIT=sqlcipher_extra_init -DSQLITE_EXTRA_SHUTDOWN=sqlcipher_extra_shutdown -DSQLCIPHER_TEST" \
LDFLAGS="-lcrypto"
$ make fuzztest
This shows an following error:
#error "SQLCipher must be compiled with -DSQLITE_THREADSAFE=<1 or 2>"
Let's fix this by adding -DSQLITE_THREADSAFE:
$ ./configure --with-tempstore=yes --enable-fts5 CFLAGS="-DSQLITE_THREADSAFE=1 -DSQLITE_HAS_CODEC -DSQLITE_EXTRA_INIT=sqlcipher_extra_init -DSQLITE_EXTRA_SHUTDOWN=sqlcipher_extra_shutdown -DSQLCIPHER_TEST" \
LDFLAGS="-lcrypto"
$ make fuzztest
We still have error:
#error "SQLCipher must be compiled with -DSQLITE_THREADSAFE=<1 or 2>"
This is because sessionfuzz.c has following define hardcoded in the code
#define SQLITE_THREADSAFE 0
Now let's remove this define so that the configured flag takes effect, and running the configure produces following error:
./fuzzcheck fuzzdata1.db: SQLite has memory in use before the start of testing
In v4.7.0, we have new instruction to configure sqlcipher. To run SQLCipher specific tests, configure as described in README and run the following to execute the tests
This shows an following error:
Let's fix this by adding -DSQLITE_THREADSAFE:
We still have error:
This is because sessionfuzz.c has following define hardcoded in the code
Now let's remove this define so that the configured flag takes effect, and running the configure produces following error: