LibAFL icon indicating copy to clipboard operation
LibAFL copied to clipboard

Add serdeany registration to constructors for no_std builds

Open addisoncrump opened this issue 1 year ago • 4 comments

#981 showed some CI errors w.r.t. empty registries, which indicates that while the program will run fine during the fuzz run, it will be unable to deserialise state. We should probably fix that by adding registration to each of the constructors.

addisoncrump avatar Jul 08 '23 20:07 addisoncrump

On no_std, registration is manual as constructors are ELF/PE specific and not available to any no_std build. Maybe we can detect if we emit ELF/PE and still use constructors, but in general it will not work for any no_std setup

andreafioraldi avatar Jul 25 '23 08:07 andreafioraldi

Ah, yes, what I'm suggesting is to execute these registrations in the constructors for the components. e.g., we should register the map indexes/novelties/history metadata when initialising a map feedback.

addisoncrump avatar Jul 26 '23 06:07 addisoncrump

Ah, yes, what I'm suggesting is to execute these registrations in the constructors for the components. e.g., we should register the map indexes/novelties/history metadata when initialising a map feedback.

This is a pretty good idea actually

domenukk avatar Mar 12 '24 23:03 domenukk

Actually, just on the first use doesn't help since it won't work for deserialization - we'd need a special "Register" function in all components/stages/mutators, probably not feasible?

domenukk avatar Mar 15 '24 16:03 domenukk