summaryrefslogtreecommitdiff
path: root/Undefined behaviour is caught by the compiler.md
diff options
context:
space:
mode:
Diffstat (limited to 'Undefined behaviour is caught by the compiler.md')
-rw-r--r--Undefined behaviour is caught by the compiler.md10
1 files changed, 10 insertions, 0 deletions
diff --git a/Undefined behaviour is caught by the compiler.md b/Undefined behaviour is caught by the compiler.md
new file mode 100644
index 0000000..62adbff
--- /dev/null
+++ b/Undefined behaviour is caught by the compiler.md
@@ -0,0 +1,10 @@
+[[Rust]]
+[[What is a segmentation fault]]
+
+Undefined behaviour is prevented by compiler checks. For example we can't use an undefined variable in a function call. If that were unchecked it's behaviour is undefined:
+- it could cause a segvault
+- it could cause no harm
+- it could become the target of a hack
+
+A list of behaviours considered undefined:
+https://doc.rust-lang.org/reference/behavior-considered-undefined.html \ No newline at end of file