-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lazy static alternatives #406
Comments
https://docs.rs/once_cell/latest/once_cell/ is the recommended
alternative, with parts of it making their way into std.
…On Sun, Oct 22, 2023 at 9:41 AM Lukasz Rubaszewski ***@***.***> wrote:
Since the resettable lazy_static has been unsupported fuzz tests using lazy_static suffer from low stability.
What do you recommend to use instead of lazy_static when implementing some fuzz tests in afl and to not decrease the stability?
(I tried to use OnceLock but the stability as low as for lazy_static.)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
--
All that is necessary for evil to succeed is for good people to do nothing.
|
Thanks for the reply. |
Ok, I've checked the So is there any other alternative that works fine with AFL? |
@lrubasze Thanks very much for doing these experiments.
I'm wondering if we should try to build something more general. For example, maybe the I'm open to other ideas though. |
@smoelius thanks for reply. Firstly, I am actually in need of it right now (not only because of
Above approach is convenient, because a reset method has access to the fuzzer internals, which might need a reset. Just wondering if it would be possible to use that Secondly, since |
There may be some technical impediment that I am not seeing, but in my head, the new feature could be used like this: fuzz_with_reset!(|data: &[u8]|, || fuzzer.reset()) {
fuzzer.fuzz_func(data);
}); And, similarly, if we had a fuzz_with_reset!(|data: &[u8]|, || resettable_once_cell::reset()) {
...
}); The
Your point is well taken. Here's a note just in case someone decides to build that crate. The When I built the If we fork * I know, to many, this will seem obvious. |
Sounds good, I like the proposition :) The note for the future builder of the |
Since the resettable
lazy_static
has been unsupported fuzz tests usinglazy_static
suffer from low stability.What do you recommend to use instead of
lazy_static
when implementing some fuzz tests in afl and to not decrease the stability?(I tried to use
OnceLock
but the stability as low as for lazy_static.)The text was updated successfully, but these errors were encountered: