Skip to content

LLVMFuzzerInitialize doesn't not error on Non Zero #1772

Open
@zz85

Description

@zz85

Problem:

https://github.com/llvm-mirror/compiler-rt/blob/master/lib/fuzzer/FuzzerInterface.h#L47 says mentions LLVMFuzzerInitialize() should return 0.

However, testing LLVMFuzzerInitialize() shows that libfuzzer does not error when -1 is returned. This can be dangerous if we are assuming tests to fail if a function is GUARDed in LLVMFuzzerInitialize.

Proposed Solution:

Move non-expensive initialization calls to LLVMFuzzerTestOneInput(), or add sanity checks in the main fuzz test function.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions