class Module

Defined at line 27 of file ../../src/sys/fuzzing/realmfuzzer/target/module.h

Represents an LLVM "module", e.g. a collection of translation units, such as a shared object

library. The instrumented processes rely on instances of these classes to collect feedback (e.g.

code coverage) for the fuzzer engine.

Public Methods

zx_status_t Import (uint8_t * counters, const uintptr_t * pcs, size_t num_pcs)

Associates this module with compiler-generated code coverage. For every edge in the control

flow graph, the compiler generates an 8-bit counter, a PC uintptr_t, and a PCFlags uintptr_t.

Thus, |counters| should be an array of length |num_pcs|, and |pcs| of length |num_pcs| * 2.

See also: https://clang.llvm.org/docs/SanitizerCoverage.html

Defined at line 17 of file ../../src/sys/fuzzing/realmfuzzer/target/module.cc

void Module ()

Defined at line 29 of file ../../src/sys/fuzzing/realmfuzzer/target/module.h

void ~Module ()

Defined at line 30 of file ../../src/sys/fuzzing/realmfuzzer/target/module.h

void Module (Module && other)

Defined at line 31 of file ../../src/sys/fuzzing/realmfuzzer/target/module.h

Module & operator= (Module && other)

Defined at line 32 of file ../../src/sys/fuzzing/realmfuzzer/target/module.h

const std::string & id ()

Returns a unique, position-independent identifier for this module. This identifier will be the

same for the same module across multiple processes and/or invocations.

Defined at line 36 of file ../../src/sys/fuzzing/realmfuzzer/target/module.h

void Update ()

Update the code-coverage counters to produce feedback for this module.

Defined at line 49 of file ../../src/sys/fuzzing/realmfuzzer/target/module.h

void Clear ()

Reset the code-coverage counters for this module.

Defined at line 52 of file ../../src/sys/fuzzing/realmfuzzer/target/module.h

zx_status_t Share (zx::vmo * out)

Shares the VMO containing the code coverage. This will set a name on the VMO constructed from

the module's id.

Defined at line 53 of file ../../src/sys/fuzzing/realmfuzzer/target/module.cc