diff options
author | drh <drh@noemail.net> | 2017-03-13 13:45:29 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2017-03-13 13:45:29 +0000 |
commit | bbc017746009e30bbac905bbd67dd1c7e1ac384c (patch) | |
tree | c908c4e6aa1bce7b274fd816a51d78be0b638cf0 /test/ossfuzz.c | |
parent | ba28b5ab0a73e80522d279eb651ac92f4c861bfe (diff) | |
download | sqlite-bbc017746009e30bbac905bbd67dd1c7e1ac384c.tar.gz sqlite-bbc017746009e30bbac905bbd67dd1c7e1ac384c.zip |
In the OSSFuzz test module, invoke the progress handler much more frequently
so that timeouts are detected punctually even if the test script is running
opcodes that individually take a long time (for example, an OP_Function opcode
that invokes "randomblob(1.5e6)").
FossilOrigin-Name: f3b6959c04c4ef7b8ff03582b867012a869d52b4a90a0d7ab079ee4c21be5464
Diffstat (limited to 'test/ossfuzz.c')
-rw-r--r-- | test/ossfuzz.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test/ossfuzz.c b/test/ossfuzz.c index 91b3d1141..97d101e17 100644 --- a/test/ossfuzz.c +++ b/test/ossfuzz.c @@ -77,11 +77,13 @@ int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { if( rc ) return 0; #ifndef SQLITE_OMIT_PROGRESS_CALLBACK - /* Invoke the progress handler every 500 thousand instructions (approximately - ** 20 to 40 times per second) to check to see if we are taking too long. + /* Invoke the progress handler frequently to check to see if we + ** are taking too long. The progress handler will return true + ** (which will block further processing) if more than 10 seconds have + ** elapsed since the start of the test. */ iCutoff = timeOfDay() + 10000; /* Now + 10 seconds */ - sqlite3_progress_handler(db, 500000, progress_handler, (void*)&iCutoff); + sqlite3_progress_handler(db, 10, progress_handler, (void*)&iCutoff); #endif /* Bit 1 of the selector enables foreign key constraints */ |