Skip to content
/ rust-ub Public

Convenient examples of undefined behavior in rust.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

gio256/rust-ub

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rust-ub

Convenient examples of undefined behavior in rust.

Usage

Unless otherwise stated, every test should exhibit UB when run with Miri.

cargo miri test ptr::test_no_provenance -- --exact

For the most part, tests that do not exhibit UB are named test_ok_*.

Many of the examples exhibit undefined behavior under the default Stacked Borrows (SB) aliasing model, but not under the Tree Borrows (TB) model. Any test can be run under TB with -Zmiri-tree-borrows:

MIRIFLAGS="-Zmiri-tree-borrows" cargo miri test borrows::test_reserved

About

Convenient examples of undefined behavior in rust.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages