unsound-zoo.github.io
The Unsound Zoo
A Collection of Unsound Rust Code
Table Of Contents
Introduction
Links to the code
Simple unsound examples
Constructing a malformed
bool
Constructing a malfomed
char
Constructing a null reference
Constructing a malformed
Box
Constructing a malformed
enum
Constructing an invalid
NonZero__
Constructing an invalid slice
Accessing uninitialized memory
Reading the padding bytes of a struct
Extending a reference lifetime
Mutating immutable data
Constructing illegal aliases
Complex unsound examples
UB via leaking a poorly-designed
Drain