-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Description
When an expected error is received, the fuzzing halts. My expected behaviour is that the fuzzing will continue and ignore the error, unless it is actually not received at all.
Minimal example to reproduce this:
$ npx jazzer fuzz-expected-error-bug.js --sync -x IgnoreThisError
Dictionary: 4 entries
INFO: Running with entropic power schedule (0xFF, 100).
INFO: Seed: 4054261925
INFO: Loaded 1 modules (512 inline 8-bit counters): 512 [0x1280c0000, 0x1280c0200),
INFO: Loaded 1 PC tables (512 PCs): 512 [0x115000000,0x115002000),
INFO: -max_len is not provided; libFuzzer will not generate inputs larger than 4096 bytes
INFO: A corpus is not provided, starting from an empty corpus
#2 INITED cov: 4 ft: 4 corp: 1/1b exec/s: 0 rss: 132Mb
INFO: Received expected error "IgnoreThisError".
$
contents of fuzz-expected-error-bug.js
:
"use strict"
const { FuzzedDataProvider } = require("@jazzer.js/core")
module.exports.fuzz = function(fuzzerInputData) {
let data = new FuzzedDataProvider(fuzzerInputData)
let number = data.consumeIntegralInRange(1, 2**35-31)
if (number > 100) {
throw new IgnoreThisError("Nothing to see here")
} else if (number == 25) {
throw Error("You found it!")
}
}
class IgnoreThisError extends Error {
constructor(message) {
super(message)
this.name = "IgnoreThisError"
}
}
Jazzer 1.6.1 on OSX, node v18.17.1.
Metadata
Metadata
Assignees
Labels
No labels