Skip to content
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

tests: Don't arbitrarily generate too deeply nested threads #452

Closed
duesee opened this issue Feb 16, 2024 · 4 comments · Fixed by #454
Closed

tests: Don't arbitrarily generate too deeply nested threads #452

duesee opened this issue Feb 16, 2024 · 4 comments · Fixed by #454
Labels
bug Something isn't working tests Improvement of tests

Comments

@duesee
Copy link
Owner

duesee commented Feb 16, 2024

Our Arbitrary implementations for recursive types are... meh... Thread derives Arbitrary, makes everything slower, and needs to be bounded (as SearchKey). This is all a pain point currently.

@duesee duesee added bug Something isn't working tests Improvement of tests labels Feb 16, 2024
@jakoschiko
Copy link
Collaborator

See rust-fuzz/arbitrary#78

@duesee
Copy link
Owner Author

duesee commented Feb 17, 2024

I cheated and build the tree in reverse now (taking a few shortcuts) -- see #454. It seems to generate good enough test data. This unblocks fuzzing for now.

@duesee
Copy link
Owner Author

duesee commented Feb 17, 2024

Idea: Can we use some async machinery to desugar recursive functions into state machines to "automatically" transform them into stack-based iterative functions? Having kind of a hard time doing this by hand ...

Notes:

@jakoschiko
Copy link
Collaborator

Idea: Can we use some async machinery to desugar recursive functions into state machines to "automatically" transform them into stack-based iterative functions?

I think this is sometimes called trampoline. It's worth a try, but the biggest problem is probably the borrow checker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tests Improvement of tests
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants