-
Notifications
You must be signed in to change notification settings - Fork 76
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
SIGSEGV on certain values #30
Comments
It looks like implementing |
Yeah it's a stack overflow. You can repro it by hand by just trying to construct |
oh, cc @fitzgen thoughts on how to fix this? |
A potential route is to turn |
Another option would be to pass in (or have a thread local, ew) a |
I tried making |
The hope is that this function const folds away, so I don't want to introduce global state |
Yeah, i'm not sure how to make this work without const_if_match, but IIRC these things should stabilize soonish |
We could probably preserve the const-folding-away by introducing a |
maybe, sounds a bit precarious |
I just want a type-level garbage collecter is that too much to ask for |
#[derive(Arbitrary)]
struct Precarious {
maybe: Option<Box<Precarious>>,
} |
Note that the implementations of `size_hint` only need to increment the depth at indirection points where recursion can happen, e.g. at a `Box`. We take advantage of this in the impls for `std` types, but conservatively do not take advantage of that in the custom derive, since it doesn't have the necessary info. Fixes rust-fuzz#30
Note that the implementations of `size_hint` only need to increment the depth at indirection points where recursion can happen, e.g. at a `Box`. We take advantage of this in the impls for `std` types, but conservatively do not take advantage of that in the custom derive, since it doesn't have the necessary info. Fixes rust-fuzz#30
Note that the implementations of `size_hint` only need to increment the depth at indirection points where recursion can happen, e.g. at a `Box`. We take advantage of this in the impls for `std` types, but conservatively do not take advantage of that in the custom derive, since it doesn't have the necessary info. Fixes rust-fuzz#30
I think this is an issue with arbitrary, but let me know where I should move it if not.
I'm observing an issue where derived arbitrary types trigger a SIGSEGV when running cargo-fuzz. Here's a minimal example:
Running this on the latest nightly (both mac and linux) triggers a SIGSEGV:
Any of these changes will remove the segfault:
Vec<Op>
to justOp
.B
enum variant fromA
A
enum variant fromB
The text was updated successfully, but these errors were encountered: