Skip to content

cargo fuzz run unconditionally attempts to create an artifacts directory in fuzz-dir #406

Description

@apoelstra

You can see in https://github.com/rust-fuzz/cargo-fuzz/blob/main/src/project.rs#L324-L326 (which calls artifacts_for, which calls fs::create_dir_all) that cargo fuzz run will always attempt to write to the project directory.

This is true even if you override the artifacts directory with -- -artifact_prefix=somewhere_writable/.

This means that you cannot use cargo-fuzz on a target that lives in the Nix store or anywhere else that isn't writeable.

It would be better if cargo-fuzz had first-class support for setting the artifacts directory separately from the fuzz directory.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions