Skip to content

Move sancov_cmp.c into sancov_cmp.rs #1937

Closed
@addisoncrump

Description

@addisoncrump

sancov_cmp.c does not need to be written in C; we can port this to Rust to unify our codebase some.

Moreover, this addresses some strange linkage behaviour we've been seeing for some time that affects linkage against targets from a .a. I re-encountered this while building an example for #1904 which prevented some symbols from being globally visible when using LibAFL as a .so. Version scripts, visibility attributes, and other strategies did not resolve this, so I think Rust does something internally here to enforce that only Rust-defined symbols are globally visible.

Related, I think we can and should move the other C files in libafl_targets to Rust; most of this code is copied from historical versions of AFL++ and could be written more effectively/idiomatically for Rust.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions