diff options
author | Melody Horn <melody@boringcactus.com> | 2020-10-19 16:27:42 -0600 |
---|---|---|
committer | Melody Horn <melody@boringcactus.com> | 2020-10-19 16:27:42 -0600 |
commit | 239fdd456e72a08465e8ef51bff12d5dbfac43dc (patch) | |
tree | 488aff3b7fb246b68dac101ec7462368886b129c /safety.md | |
parent | a6543cd772b22889e17b59507d7fbf6fd8a41bc1 (diff) | |
download | spec-239fdd456e72a08465e8ef51bff12d5dbfac43dc.tar.gz spec-239fdd456e72a08465e8ef51bff12d5dbfac43dc.zip |
super rough draft of memory safety
Diffstat (limited to 'safety.md')
-rw-r--r-- | safety.md | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/safety.md b/safety.md new file mode 100644 index 0000000..d353227 --- /dev/null +++ b/safety.md @@ -0,0 +1,61 @@ +Each item in Wikipedia's [list of types of memory errors](https://en.wikipedia.org/wiki/Memory_safety#Types_of_memory_errors) and what Crowbar does to prevent them.
+
+# Access errors
+
+## Buffer overflow
+
+bounds checking based on uhhhh something
+
+## Buffer over-read
+
+bounds checking again
+
+## Race condition
+
+uhhhhh 🤷♀️
+
+## Page fault
+
+bounds checking, dubious-pointer checking
+
+## Use after free
+
+`free(x);` not followed by `x = NULL;` is a compiler error
+
+# Uninitialized variables
+
+C already warns about these in most cases, so we're good.
+
+## Null pointer dereference
+
+dubious-pointer checking
+
+## Wild pointers
+
+let C handle it
+
+# Memory leak
+
+## Stack exhaustion
+
+uhhhhhh 🤷♀️
+
+## Heap exhaustion
+
+that counts as error handling, just the `malloc`-shaped kind
+
+## Double free
+
+this is just use-after-free but the use is calling free on it
+
+## Invalid free
+
+don't do that
+
+## Mismatched free
+
+how does that even happen
+
+## Unwanted aliasing
+
+uhhh don't do that?
|