From 295b343aecf330e830d79f06e0efc511e7d76da1 Mon Sep 17 00:00:00 2001 From: Jasper Ras Date: Tue, 5 Aug 2025 08:53:21 +0200 Subject: vault backup: 2025-08-05 08:53:21 --- Undefined behaviour is caught by the compiler.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 Undefined behaviour is caught by the compiler.md (limited to 'Undefined behaviour is caught by the compiler.md') 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 -- cgit v1.2.3