LibAFL
LibAFL copied to clipboard
Add serdeany registration to constructors for no_std builds
#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.
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
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.
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
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?