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

Fuzz testing with fault injection #2736

Closed
brson opened this issue Jun 28, 2012 · 8 comments
Closed

Fuzz testing with fault injection #2736

brson opened this issue Jun 28, 2012 · 8 comments
Labels
P-low Low priority

Comments

@brson
Copy link
Contributor

brson commented Jun 28, 2012

The semantics of rust tasks allow them to fail unexpectedly. Currently the two scenarios where this happen are:

  • Immediately before or after any yield (e.g. send and receive). In the future the compiler will insert yield points as well
  • When stack growth fails

The story for how tasks should cope with this are unclear. Right now there is a function unkillable which creates a scope where tasks cannot be killed by other tasks, but it does not do anything about hitting the end of the stack.

There is a lot of unsafe code in the core and standard libraries that is not aware of its obligations to cope with random failure.

I would like to instrument the runtime and core libraries to allow failure to be injected at various points, then create a tool that takes a crate of tests and runs them while poking at them with the fail stick.

@graydon
Copy link
Contributor

graydon commented Apr 25, 2013

nominating for well covered

@emberian
Copy link
Member

Triage bump

@huonw
Copy link
Member

huonw commented Sep 10, 2013

Triage: this is probably improving (as in, people are occasionally noticing that something is not failure-safe and fixing it, hopefully faster than new non-failure safe code is being introduced), but there's still no automated tool for it.

A very crude way to do this for a subset of the functions in the stdlib would be to have tests passing |_, ..., _| fail!() to any functions that take a closure (although there are fewer of these now, with external iterators); clearly this only gets a very limited number, but possibly the ones that will most commonly fail "randomly".

@emberian
Copy link
Member

Would it be possibly to hack this together with gdb? I'm thinking "break randomly, call <function that does what fail! does>, continue".

@bstrie
Copy link
Contributor

bstrie commented Nov 8, 2013

Is this a bug asking for an instrument to perform fuzz testing in general, i.e. a resurrection of #414?

@bstrie bstrie mentioned this issue Nov 8, 2013
@pnkfelix
Copy link
Member

Accepted for P-low.

@treeman
Copy link
Contributor

treeman commented Sep 2, 2014

Triage bump.

@steveklabnik
Copy link
Member

I'm pulling a massive triage effort to get us ready for 1.0. As part of this, I'm moving stuff that's wishlist-like to the RFCs repo, as that's where major new things should get discussed/prioritized.

This issue has been moved to the RFCs repo: rust-lang/rfcs#608

RalfJung pushed a commit to RalfJung/rust that referenced this issue Dec 24, 2022
update josh instructions

Fixes rust-lang/miri#2730

r\? `@oli-obk`
Aaron1011 pushed a commit to Aaron1011/rust that referenced this issue Jan 6, 2023
update josh instructions

Fixes rust-lang/miri#2730

r\? `@oli-obk`
celinval added a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P-low Low priority
Projects
None yet
Development

No branches or pull requests

8 participants