rust - acm learning center...null pointers • data races #-pulser_g2, a demonstration of...
TRANSCRIPT
![Page 1: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/1.jpg)
RustIn It for the Long Haul
Carol (Nichols || Goulding) @carols10cents
![Page 2: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/2.jpg)
is.gd/rustLH
![Page 4: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/4.jpg)
Manning liveVideo
![Page 6: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/6.jpg)
Rust Core Team
![Page 7: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/7.jpg)
(yep, I’m biased)
![Page 8: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/8.jpg)
![Page 9: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/9.jpg)
Plan•Railroad industry
•C
•Rust
•What the software industry can learn from the railroad industry
![Page 10: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/10.jpg)
Plan➡ Railroad industry
•C
•Rust
•What the software industry can learn from the railroad industry
![Page 11: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/11.jpg)
1830
![Page 12: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/12.jpg)
Miles of Rail in the US
0
35,000
70,000
105,000
140,000
1840 1850 1860 1870 1880 1890
Wikipedia
![Page 13: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/13.jpg)
Brakeman
Engraving by PeckwellPublished 1890 in The Railroad ConductorPublic Domain in the US, Wikipedia
![Page 14: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/14.jpg)
George Westinghouse
Photo: public domain in the US, Wikipedia
![Page 15: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/15.jpg)
Air Brakes•Compressed air
•Controls in the locomotive
•Air lines connecting all cars
•Apply brakes all at once
•Brakes on when there’s no pressure
![Page 16: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/16.jpg)
– Cornelius Vanderbilt, owner of the New York Central Railroad
“Do you pretend to tell me that you could stop trains
with air?”
![Page 17: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/17.jpg)
Ad in 1936 Railway AgePublic Domain in the US, Wikipedia
![Page 18: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/18.jpg)
Ad in 1936 Railway AgePublic Domain in the US, Wikipedia
“The swift operation of these nightly carriers is safeguarded by Westinghouse Air Brakes”
![Page 19: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/19.jpg)
–L.S. Coffin, Iowa Railroad Commissioner, Senate Hearing, 1890
“They thought it was a necessity somehow, that it occurred as a matter of course, that
some men had to be killed.”
![Page 20: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/20.jpg)
–Mr. Roberts, President of the Pennsylvania Railroad Company, Senate Hearing, 1890
“If you are going to subject the railroad companies to this class of supervision, then you might as well
go into the character of bridges, which is as serious a question as we have to deal with, and say that the bridges must conform to such and
such standards.”
![Page 21: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/21.jpg)
US Railroad Safety Appliance Act
1893
![Page 22: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/22.jpg)
Act fully enforced1900
![Page 23: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/23.jpg)
Not perfect; Vast improvement
![Page 24: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/24.jpg)
Plan•Railroad industry
➡ C
•Rust
•What the software industry can learn from the railroad industry
![Page 25: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/25.jpg)
why C?
![Page 26: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/26.jpg)
performance👍
![Page 27: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/27.jpg)
portability👍
![Page 28: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/28.jpg)
simplicity👍
![Page 29: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/29.jpg)
legacy code👍
![Page 30: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/30.jpg)
stability👍
![Page 31: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/31.jpg)
memory unsafety👎👎👎👎👎👎👎
![Page 32: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/32.jpg)
Memory Safety Problems•Use after free•Double free•Memory leaks•Buffer overreads/overwrites•Null pointers•Data races
![Page 33: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/33.jpg)
Memory Safety Problems•Use after free•Double free•Memory leaks•Buffer overreads/overwrites•Null pointers•Data races
😱
![Page 34: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/34.jpg)
-Pulser_G2, A Demonstration of Stagefright-like Mistakes
“The best way to prevent these kinds of attacks is either to use a higher level language, which
manages memory for you (albeit with less performance), or to be very, very, very, very careful when coding. More careful than the
entirety of the Android security team, for sure.”
![Page 35: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/35.jpg)
–Catalin Cimpanu reporting on a presentation by Matt Miller, MS security engineer. ZDNet, 2019-02-11
“Around 70 percent of all the vulnerabilities in Microsoft products addressed through a
security update each year are memory safety issues”
![Page 36: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/36.jpg)
Efforts to make C safer
![Page 37: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/37.jpg)
valgrind
![Page 38: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/38.jpg)
ASAN
![Page 39: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/39.jpg)
UBSAN
![Page 41: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/41.jpg)
MISRA
![Page 42: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/42.jpg)
Write code THEN
make it safe
![Page 43: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/43.jpg)
Safe-C, Checked C
![Page 44: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/44.jpg)
C++
![Page 45: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/45.jpg)
Plan•Railroad industry
•C
➡ Rust
•What the software industry can learn from the railroad industry
![Page 46: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/46.jpg)
Rust
![Page 47: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/47.jpg)
#1: Fixes common memory safety
problems
![Page 48: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/48.jpg)
Ownership Borrowing
![Page 49: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/49.jpg)
fn main() {
let x = String::from("hi");
println!("{}", x);
}
![Page 50: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/50.jpg)
fn main() {
let x = String::from("hi");
println!("{}", x);
}
Allocates memory
![Page 51: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/51.jpg)
fn main() {
let x = String::from("hi");
println!("{}", x);
}
Allocates memory
Owner
![Page 52: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/52.jpg)
fn main() {
let x = String::from("hi");
println!("{}", x);
}
Allocates memory
Owner
Owner goes out of scope, memory is cleaned up
![Page 53: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/53.jpg)
fn main() {
let x = String::from("hi");
let y = x;
println!("{}", x);
}
![Page 54: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/54.jpg)
fn main() {
let x = String::from("hi");
let y = x;
println!("{}", x);
}
Moves ownership
![Page 55: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/55.jpg)
fn main() {
let x = String::from("hi");
let y = x;
println!("{}", x);
}
error[E0382]: borrow of moved value: `x`
- value moved here
^ value borrowed here after move
![Page 56: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/56.jpg)
fn main() {
let x = String::from("hi");
let y = &x;
println!("{}", x);
}
![Page 57: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/57.jpg)
fn main() {
let x = String::from("hi");
let y = &x;
println!("{}", x);
}
Immutable borrow
![Page 58: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/58.jpg)
fn main() {
let x = String::from("hi");
let y = &x;
println!("{}", x);
println!("{}", y);
}
![Page 59: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/59.jpg)
fn main() {
let y = {
let x = String::from("hi");
&x
};
println!("{}", y);
}
![Page 60: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/60.jpg)
fn main() {
let y = {
let x = String::from("hi");
&x
};
println!("{}", y);
}
Returning a reference
![Page 61: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/61.jpg)
fn main() {
let y = {
let x = String::from("hi");
&x
};
println!("{}", y);
}
Returning a referencex is cleaned up
![Page 62: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/62.jpg)
error[E0597]: `x` does not live long enough --> src/main.rs:4:9 |2 | let y = { | - borrow later stored here3 | let x = String::from("hi");4 | &x | ^^ borrowed value does not live long enough5 | }; | - `x` dropped here while still borrowed
![Page 63: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/63.jpg)
Rust Safety• Either one mutable reference OR many immutable references
• No null, only Option
• Out-of-bounds access = at runtime, program stops
• Ownership rules apply across multiple threads
![Page 64: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/64.jpg)
Computers are good at tedium.
⚠ Beep, boop. You forgot a semicolon in 23,982 places
![Page 65: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/65.jpg)
#2: Systems programming is for
superhumans everyone
![Page 66: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/66.jpg)
unsafe
![Page 67: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/67.jpg)
Unsafe code can…•Dereference a raw pointer
•Call an unsafe function
• Implement unsafe traits
•Mutate global variables
• Access fields of unions
![Page 68: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/68.jpg)
👋 Look here for the cause of memory
problems! 👋
![Page 69: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/69.jpg)
Opt OUT
![Page 70: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/70.jpg)
Further unsafe Info•Building on an Unsafe Foundation -
Jason Orendorff, RBR 2018
•The Rustonomicon
![Page 71: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/71.jpg)
Logic bugs
![Page 72: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/72.jpg)
Tests
![Page 73: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/73.jpg)
Fuzzers
![Page 74: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/74.jpg)
memory safety👍 👍
![Page 75: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/75.jpg)
performance👍
![Page 76: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/76.jpg)
portability👍👎
![Page 77: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/77.jpg)
simplicity👎
![Page 78: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/78.jpg)
legacy code👍
![Page 80: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/80.jpg)
stability👍
![Page 81: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/81.jpg)
stability👍
**We reserve the right to fix compiler bugs, patch safety holes, and change type inference in ways that may occasionally require new type annotations. We do not expect any of these changes to cause headaches when upgrading Rust. (more detailed documentation)
![Page 82: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/82.jpg)
Has upgrading broken your code?
Yes - 7.4%
No - 92.6%
![Page 83: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/83.jpg)
#3: stability without
stagnation
![Page 85: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/85.jpg)
Source code
![Page 86: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/86.jpg)
Source code HIR
![Page 87: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/87.jpg)
Source code HIR MIR
![Page 88: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/88.jpg)
Source code HIR MIR LLVM
IR
![Page 89: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/89.jpg)
Source code HIR MIR LLVM
IRMachine
code
![Page 90: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/90.jpg)
Source code HIR MIR
Borrow checking, Optimizations,
Code generation
LLVM IR
Machine code
![Page 91: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/91.jpg)
2015 Edition Source Code
HIR
MIR
Borrow Checking, Optimizations,
Code Generation
LLVM IR
Machine Code
2018 Edition Source Code
HIR
![Page 92: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/92.jpg)
No ecosystem split!!!
Rust 2015 Library
Rust 2018 Library
Rust 2018 Project
Rust 2015 Project
![Page 93: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/93.jpg)
You pick when to switch editions
(never is totally fine!)
![Page 94: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/94.jpg)
rustfix
![Page 95: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/95.jpg)
Rust 2.0X
![Page 96: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/96.jpg)
// TODO• ISO/ECMA Standard
•Compiler certification
• LTS Release
•Better cargo/build system integration
•Private crate hosting
• Improved ecosystem
![Page 97: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/97.jpg)
#4: Large Enterprises are
using Rust
![Page 98: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/98.jpg)
Mozilla
![Page 99: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/99.jpg)
CSS Component
Implications of Rewriting a Browser Component in Rust
By Diane Hosfelt, 2019-02-28
![Page 100: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/100.jpg)
CSS Component• Security bugs since Firefox started: 69
Implications of Rewriting a Browser Component in Rust
By Diane Hosfelt, 2019-02-28
![Page 101: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/101.jpg)
CSS Component• Security bugs since Firefox started: 69
•Rust would have prevented: 51
Implications of Rewriting a Browser Component in Rust
By Diane Hosfelt, 2019-02-28
![Page 102: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/102.jpg)
CSS Component• Security bugs since Firefox started: 69
•Rust would have prevented: 51
73.9%Implications of Rewriting a Browser Component in Rust
By Diane Hosfelt, 2019-02-28
![Page 103: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/103.jpg)
AppAmaGooBookSoft•Apple
•Amazon - Firecracker
•Google - Fuchsia
•Facebook - Mononoke
•Microsoft - IoT Edge
![Page 104: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/104.jpg)
#5: Rust Governance
![Page 105: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/105.jpg)
No BDFL
![Page 106: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/106.jpg)
Teams and Working Groups• Programming language theorists and designers
• Enterprise users
• Hobby users
• People from low-level languages
• People from high-level languages
• People from functional languages
![Page 107: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/107.jpg)
Decisions made via public RFCs
![Page 108: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/108.jpg)
Code of Conduct
![Page 109: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/109.jpg)
Rust’s staying power• Significant improvement in memory safety over the
status quo
• More programmers can write and maintain it
• Editions enable stability without stagnation
• Large companies are depending on it
• Governance set up to endure
![Page 110: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/110.jpg)
Plan•Railroad industry
•C
•Rust
➡ What the software industry can learn from the railroad industry
![Page 111: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/111.jpg)
Silicon Valley arrogance
![Page 112: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/112.jpg)
Juicero shows what’s wrong with Silicon Valley thinking
–Christine Emba, Washington Post, 2017-04-24
![Page 113: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/113.jpg)
The Lyft Shuttle is pretty much a glorified city bus — with fewer poor people
–Keith Spencer, Salon, 2017-06-19
![Page 114: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/114.jpg)
–Nick Allen, The Telegraph, 2018-07-14
Elon Musk ‘can stick his submarine where it hurts’ says British diver who helped Thai cave rescue
![Page 115: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/115.jpg)
Trains not stopping = people dying
![Page 116: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/116.jpg)
Memory unsafety?? = ???
![Page 117: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/117.jpg)
Actual Consequences
![Page 118: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/118.jpg)
Actual Consequences
WannaCry Ransomware May 2017
![Page 119: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/119.jpg)
Actual Consequences
![Page 120: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/120.jpg)
Actual Consequences
+ =X
![Page 121: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/121.jpg)
Actual Consequences
+ =X
![Page 122: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/122.jpg)
Actual Consequences
+ =XX
![Page 123: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/123.jpg)
Actual Consequences
+ =
Images from Shastry, Eucalyp, and Maxim Kulikov via the Noun Project
XX people
dying
![Page 124: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/124.jpg)
July 17, 2019 House Financial Services Committee
Hearing on Facebook’s Libra Cryptocurrency
![Page 125: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/125.jpg)
July 17, 2019 House Financial Services Committee
Hearing on Facebook’s Libra Cryptocurrency
Congressman Riggleman of Virginia
![Page 126: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/126.jpg)
July 17, 2019 House Financial Services Committee
Hearing on Facebook’s Libra Cryptocurrency
Congressman Riggleman of Virginia
David Marcus Head of Calibra at Facebook
![Page 127: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/127.jpg)
![Page 128: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/128.jpg)
Not the norm!!!
![Page 129: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/129.jpg)
We are our own informed consumers
![Page 130: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/130.jpg)
1830 -> 1869 -> 190039 years 31 years
![Page 131: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/131.jpg)
1973 -> 2015 -> ????42 years ?? years
![Page 132: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/132.jpg)
Are we better?
![Page 133: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/133.jpg)
RustIn It for the Long Haul
![Page 134: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/134.jpg)
RustIn It for the Long Haul???
![Page 135: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/135.jpg)
I could be wrong!
![Page 136: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/136.jpg)
![Page 137: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/137.jpg)
![Page 138: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/138.jpg)
Why not all of them? 🤷
![Page 139: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/139.jpg)
new mistakes!
![Page 140: Rust - ACM Learning Center...Null pointers • Data races #-Pulser_G2, A Demonstration of Stagefright-like Mistakes “The best way to prevent these kinds of attacks](https://reader036.vdocuments.site/reader036/viewer/2022071405/60f9a7b47aad8000ce4e5061/html5/thumbnails/140.jpg)
50% off Rust in Motion course at
manning.com: tsrust
is.gd/rustLH @carols10cents