1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Improvements to the ossfuzz.c fuzz-testing module so that it works with

-DSQLITE_OMIT_PROGRESS_CALLBACK and with -DSQLITE_OMIT_INIT.

FossilOrigin-Name: d343f7d6b05865c282eb73a0e39dc396f2927982af45b3d045de03ef73715693
This commit is contained in:
drh
2018-11-21 14:27:34 +00:00
parent 3c425484a7
commit 8055a3ead4
4 changed files with 26 additions and 19 deletions

View File

@ -405,7 +405,10 @@ static void blobListFree(Blob *p){
static sqlite3_int64 timeOfDay(void){
static sqlite3_vfs *clockVfs = 0;
sqlite3_int64 t;
if( clockVfs==0 ) clockVfs = sqlite3_vfs_find(0);
if( clockVfs==0 ){
clockVfs = sqlite3_vfs_find(0);
if( clockVfs==0 ) return 0;
}
if( clockVfs->iVersion>=1 && clockVfs->xCurrentTimeInt64!=0 ){
clockVfs->xCurrentTimeInt64(clockVfs, &t);
}else{
@ -866,6 +869,7 @@ int main(int argc, char **argv){
sqlite3_vfs *pDfltVfs; /* The default VFS */
int openFlags4Data; /* Flags for sqlite3_open_v2() */
sqlite3_initialize();
iBegin = timeOfDay();
#ifdef __unix__
signal(SIGALRM, timeoutHandler);